Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter command `jupyter-lab` not found

I have tried to install jupyter lab on my Kubuntu machine. If I install jupyter lab with 'pip3 install jupyter jupyterlab' the command 'jupyter notebook' works completly fine. But if I try to run 'jupyter lab' every time I get the message:

Traceback (most recent call last):   File "/usr/local/bin/jupyter", line 11, in <module>     sys.exit(main())   File "/usr/local/lib/python3.6/dist-packages/jupyter_core/command.py", line 230, in main     command = _jupyter_abspath(subcommand)   File "/usr/local/lib/python3.6/dist-packages/jupyter_core/command.py", line 133, in _jupyter_abspath     'Jupyter command `{}` not found.'.format(jupyter_subcommand) Exception: Jupyter command `jupyter-lab` not found. 

What is wrong?

I tried to reinstall jupyter and jupyterlab multiple times with the same issue.

like image 520
CacherJoe100 Avatar asked Aug 27 '19 14:08

CacherJoe100


People also ask

Why jupyter command not found?

If you encounter an error like "Command 'jupyter' not found", please make sure PATH environment variable is set correctly. Alternatively, you can start up JupyterLab using ~/. local/bin/jupyter lab without changing the PATH environment variable.

How do I enable JupyterLab?

Visit https://jupyter.org/try and choose 'try JupyterLab' option. The launcher tab shows currently available kernels and consoles. You can start a new notebook based/terminal based on any of them. The left column is also having tabs for file browser, running kernels and tabs and settings view.

How do I add JupyterLab to PATH?

From the Control Panel, click System > Advanced system settings > Environment Variables and add the required directory to the PATH variable. Depending on how you install and launch JupyterLab, it may be necessary to set your System PATH environment variable, not the User environment variable.

How do I start JupyterLab from command line?

Once you've entered your specific folder with Windows Explorer, you can simply press ALT + D, type in cmd and press Enter. You can then type jupyter notebook to launch Jupyter Notebook within that specific folder.


1 Answers

Its the space. Its always the space. Never ever use spaces within package name. Its always either namepart1-namepart2 or namepart1namepart2. This is because arguments are separated by space. So if you put space in between, it makes pip think that you want to install two different packages named jupyter and lab. Just use:

python -m pip install jupyterlab 

Or simply:

pip install jupyterlab 

No need to uninstall or reinstall anything. However to run jupyter lab server you might want to add spaces as follows:

jupyter lab 
like image 188
Hamza Avatar answered Sep 22 '22 04:09

Hamza