Ubuntu – Ubuntu 18.04 – jupyter notebook – Error executing Jupyter command ‘notebook’: [Errno 2] No such file or directory

18.04jupyterpython3

I am trying to run jupyter notebook on Ubuntu 18.04. After its installation by:

sudo apt-get install python3-notebook jupyter-core python-ipykernel
sudo apt-get install python3-dev
sudo apt-get install python-dev
pip3 install jupyter
jupyter notebook --generate-config

it seemed to work perfectly by running jupyter notebook, but after rebooting, the systems returns this error:

Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

Jupyter seems to work by running this command:

python3 -m IPython notebook

but I would like to solve the problem with the command jupyter notebook.

Further information about my jupyter:

after pip3 list | grep jupyter:

jupyter (1.0.0)
jupyter-client (5.2.3)
jupyter-console (5.2.0)
jupyter-contrib-core (0.3.3)
jupyter-contrib-nbextensions (0.5.0)
jupyter-core (4.4.0)
jupyter-highlight-selected-word (0.2.0)
jupyter-latex-envs (1.4.4)
jupyter-nbextensions-configurator (0.4.0)

after pip3 list | grep ipy:

ipykernel (4.8.2)
ipython (6.5.0)
ipython-genutils (0.2.0)

after jupyter --paths:

config:
    /home/ale/.jupyter
    /usr/etc/jupyter
    /usr/local/etc/jupyter
    /etc/jupyter
data:
    /home/ale/.local/share/jupyter
    /usr/local/share/jupyter
    /usr/share/jupyter
runtime:
    /run/user/1000/jupyter

Best Answer

Apparently, my PATH variable has been somehow messed up, as it did not refer to the ./local/bin directory correctly.