Can't run Jupyter notebook

Viewed 3558

I installed Jupyter Notebook using pip install notebook but I am not able to run it.

When I try runing using jupyter notebook, it gives me the CommandNotFoundException: Error when running 'jupyter notebook'

and

When I try runing using python -m notebook, it gives me the ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython': Error when running 'python -m notebook'

I have added the following into PATH:

  1. Path to python.exe present inside local folder.
  2. Path to scripts folder present inside local folder.
  3. Path to scripts folder present inside roaming folder.


All the jupyter dependencies(jupyter.exe, jupyter-core.exe, etc) are present in scripts folder inside 'Roaming' folder and not inside 'local' folder.

enter image description here

python version: 3.8.4
pip version: 20.1.1

3 Answers

Use: python3 -m notebook in the terminal.

I had worked with Jupyter Notebook and usually the cause for most of the cases is missing dependecy - Jupyter got a lot of them.

Please check if they are not missing by running:

python -m pip check

or

pip check

This will give you list of missed (sometimes there are versions problems) dependencies. Installing proper version with pip install <dep>==<version> should help.

Edited: @Divyessh Maheshwari, if you have installed anaconda, then make sure you are running jupyter notebook in the anaconda prompt.

If you haven't and you don't want to install anaconda, you might need to downgrade Python according to this answer Is there a way to run Jupyter Notebooks Without Anaconda?

Related