Jupyter command `jupyter-lab` not found

CacherJoe100 picture CacherJoe100 · Aug 27, 2019 · Viewed 30.4k times · Source

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.

Answer

Hamza picture Hamza · Nov 20, 2019

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