jupyterlab/jupyterlab-toc

How to install if I cannot run "jupyter"

forest-jiang opened this issue · 4 comments

Hi,

For some reason I have to use python3 -m jupyterlab to start my jupyter lab.
I am wondering how could I install and use this great extension?
Thanks!

How did you install JupyterLab?
Try:
pip install jupyterlab
Then, when it's done,
jupyter lab
Be careful to include a space between jupyter and lab in the command above

Then, to install this extension, run jupyter labextension install @jupyterlab/toc. Does that work? Do you see any errors when you run the steps above?

I used pip3 install jupyterlab to install and then it says "-bash: jupyter: command not found". I cannot use "pip" to install because:

Traceback (most recent call last):
File "/usr/local/bin/pip", line 6, in
from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip._internal.cli.main'

Looks like this addresses your issue: https://pypi.org/project/jupyterlab/#:~:text=If%20you%20encounter%20an%20error,changing%20the%20PATH%20environment%20variable.

Try running ~/.local/bin/jupyter lab to start JupyterLab and if that works, run ~/.local/bin/jupyter labextension install @jupyterlab/toc.

That doesn't work for me. But I found a bunch of Unix executables named "jupyter-*" including "jupyter-labextension" so this command works for me:
sudo jupyter-labextension install @jupyterlab/toc