Installed jupyter notebook without anaconda have error like "zsh: command not found: jupyter" - jupyter-notebook

I installed jupyter notebook without anaconda.
(Maybe I think that I installed this with pip3 command.)
In terminal, I can't execute jupyter notebook with this command
jupyter notebook
but another command can execute notebook
python3 -m notebook
I added path in .zshrc file. but nothing changed.
Jupyter path
pip3 show jupyter | grep Location
Location: /Users/myName/Library/Python/3.9/lib/python/site-packages
In my zshrc file
export PATH=/Users/myName/Library/Python/3.9/lib/python/site-packages:$PATH
How can I use the command "jupyter notebook" in terminal?

Related

How can I open jupyter notebook in venv to my drake work correct

I install drake via pip in venv and I want open files from course underactuated.
I start venv by typing:
source env/bin/activate
Drake installed correct because of output of python3 -c 'import pydrake.all; print(pydrake.__file__)':
(env) dmitriy#dmitriy:~/git/underactuated$ python3 -c 'import pydrake.all; print(pydrake.__file__)'
/home/dmitriy/env/lib/python3.8/site-packages/pydrake/__init__.py
But when I try run it in Jupyter notebook with Kernel env I have:
ModuleNotFoundError Traceback (most recent call last)
Input In [1], in <cell line: 1>()
----> 1 import pydrake.all; print(pydrake.__file__)
ModuleNotFoundError: No module named 'pydrake'
How can I open jupyter notebook in venv to my drake work correct ?
This is because I have not installed jupyter / IPython in your virtualenv.
This is the solution: Running Jupyter notebook in a virtualenv: installed sklearn module not available

Why does the command Jupiter notebook return an error

When I try to run Jupiter notebook form the command line I get the following error:
"Jupyter command jupyter-notebook not found."
I have Anaconda installed and can do this from the navigator no problem.
The docs can help: https://docs.jupyter.org/en/latest/running.html
On the command prompt run:
jupyter notebook
(w/o dash)

How to add SageMath 9.4 kernel in Jupyter notebook

I have installed SageMath 9.4, but I could not lunch it in my terminal. When I type sage it said zsh: command not found: sage then I tried
alias sage='/Applications/SageMath-9-4.app'
and type sage again it said
zsh: permission denied: /Applications/SageMath-9-4.app
next I tried to add permission on that SageMath file. I cd to Applications file and type
chmod +x ./SageMath-9-4.app
Nothing happened.
I tried these to add sage in my Jupyter notebook directly
sudo jupyter kernelspec install /Applications/SageMath-9-4.app
jupyter kernelspec install --user /Applications/SageMath-9-4.app
They didn't work.
by the way:
jupyter kernelspec list
Available kernels:
python3 /Applications/anaconda3/share/jupyter/kernels/python3
I googled these operations, but they didn't work on me. what should I do?
I want to lunch Sage in terminal when I type sage and I want to select kernel whenever I use Jupyter notebook.
The only way I can lunch SageMath is double click the App icon, and there will be a pop-out window
Here is how I got it on MacOS with SageMath 9.5 mac app install from homebrew.
(base) ➜ ~ sage -sh -c 'ls -d $SAGE_VENV/share/jupyter/kernels/python3'
/private/var/tmp/sage-9.5-current/local/var/lib/sage/venv-python3.9.9/share/jupyter/kernels/python3
(base) ➜ ~ jupyter kernelspec install --user $(sage -sh -c 'ls -d $SAGE_VENV/share/jupyter/kernels/python3')
[InstallKernelSpec] Installed kernelspec python3 in /Users/XXXXXX/Library/Jupyter/kernels/python3
(base) ➜ ~ jupyter lab

How to use conda from Jupyter Lab terminal?

Question in the title. What I've tried: Installing nb_conda and nb_conda_kernels. This did allow me to choose the environment my kernel runs in. However, I am unable to use conda from the terminal inside the Jupyter Lab notebook.
Before launching Jupyter Lab:
(base)
wesle#DESKTOP-VV4V3ND MINGW64 ~/Jupyter Notebooks/jn-anomaly-detect (master)
$ conda activate general-ml
(general-ml)
wesle#DESKTOP-VV4V3ND MINGW64 ~/Jupyter Notebooks/jn-anomaly-detect (master)
$ jupyter lab
From Jupyter Lab terminal:
Change the kernel to run in the general-ml conda environment, then open up a notebook terminal:
wesle#DESKTOP-VV4V3ND MINGW64 ~/Jupyter Notebooks/jn-anomaly-detect (master)
$ conda info -e
bash: conda: command not found
as if it doesn't exist at all. Is there a known solution to this?
Edit:
I noticed that packages installed from Anaconda Navigator GUI are reflected live in Jupyter Notebook. This is an undesirable workaround as it is not efficient to open a new program, navigate through the gui, search for a package then install. All of this could be done from the terminal in 3 seconds.

Can't run jupyter notebook after installation

[when i run jupyter notebook i got this error again after all commands ][3]
enter image description here
Try this, it will reinstall everything from pypi.
pip3 install --upgrade --force-reinstall --no-cache-dir jupyter
Then Try to use this command to run you notebook as your terminal also suggested.
jupyter notebook

Resources