简体   繁体   中英

Can't run Jupyter notebook

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 : 运行“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' : 运行“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.

在此处输入图像描述

python version: 3.8.4
pip version: 20.1.1

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM