Jupyter command `jupyter-lab` not found
Solution 1
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
Solution 2
In my case, the only way to fix this was to add the following directory to the PATH
in Linux:
/home/ubuntu/.local/bin
Solution 3
I had the same error on Windows 10. It was with pip install jupyterlab
. Then after the error I uninstalled it with pip and reinstalled with "pip install jupyterlab". Everything worked flawlessly thereafter.
In your case you're using pip3. Try it as above or see if pip3 needs an update.
Solution 4
When installing jupyterlab, we may get warning like this:
Installing collected packages: jupyterlab
WARNING: The scripts jlpm, jupyter-lab, jupyter-labextension and jupyter-labhub are installed in '/home/tln/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed jupyterlab-3.0.14
So as per this warning, scripts like jupyter-lab will be unavailable unless added to the PATH.
Use below command to add these scripts to be able to use from command line:
tln@tln-X550LD:~$ export PATH="$HOME/.local/bin:$PATH"
That's it. This worked fine for me.
Solution 5
I had same issue. I solved it running pip install jupyterlab in prompt with admin privilegies.
Admin
Updated on July 09, 2022Comments
-
Admin almost 2 years
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.
-
Pierre C. about 4 yearsthe
jupyter lab
package doesn't exist as it should be in one word (jupyterlab
) -
nferreira78 almost 4 years@Tommy perhaps editing the answer, doesn't mean that the answer is not useful.
-
carloswm85 almost 4 yearsI have a W10 system. For some weird reason (I'm not interested in figuring out why) I've got the jupyter-lab.exe installed in a different folder. In case you don't find that executable file, look for it using the Windows File Explorer.
-
carloswm85 almost 4 yearsI came back here just to tell you the best and quicker way to find the exe file. Open the command prompt and go to the C:/ drive. Type in
dir jupyter-lab.exe /s /p
This should give you the exact location of the file. -
Tom Bush over 3 yearsFixed the problem for me having installed Jupyter lab using
pip
into userspace -
Jashanpreet singh Chakkal almost 3 yearsthe explanation is, during pip install, it does show similar warning about the path not set in linux system.
-
jbarlow over 2 yearsAs usual on stackoverflow, any answer more than a year old will become obsolete so this is now incorrect except for older OSes. jupyter removed jupyter lab from its default install, so you must separately do
pip install jupyterlab
. -
Hamza over 2 yearsDont understand whats obselete here? Works on Windows 11, Python 3.9
-
user15420598 over 2 yearsThanks for the tip to install with admin privileges . On win 10 pip install jupyterlab command with admin privileges fixed the jupyter lab not found error
-
np8 about 2 yearsOne important point here is to look at the output of
pip install jupyterlab
. Did it have any errors? I had. Perhaps some files were being used when tried to install. Login. Logout. Pip install jupyterlab again. And volà!