Jupyter notebook cannot be opened or an error is reported [jupyter notebook Traceback (most recent call last):]

Jupyter notebook cannot be opened or an error is reported [jupyter notebook Traceback (most recent call last):]

Error description: After reinstalling Anaconda3, double-clicking the icon of jupyter notebook cannot open it, and the following error occurs when opening it using the command line. I also tried two methods with reference to two blogs. Method 1 still cannot be opened after the test, and method 2 can be opened after the test.

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
    from notebook.notebookapp import main
  File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 47, in <module>
    from zmq.eventloop import ioloop
  File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module>
    from zmq import backend
  File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
    raise value
  File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\select.py", line 27, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "C:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: DLL load failed: 找不到指定的模块。

Method 1: Reinstall pyzmq under conda.

Reference blog: https://blog.csdn.net/lwgkzl/article/details/85202207#commentBox

Enter the command first

pip uninstall pyzmq 

Re-enter the command

pip install pyzmq

Method 2: Reinstall jupyter notebook

Reference: https://www.cnblogs.com/it-ruanjie/p/15256579.html

Choose to open Anaconda Prompt (Anaconda3)
insert image description here
and enter the command first

pip uninstall jupyter 

Re-enter the command

pip install jupyter 

If the installation is unsuccessful, switch to the Tsinghua source

pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple

Guess you like

Origin blog.csdn.net/sunsoldeir1/article/details/128451248