Anaconda中的Jupyter 在Windows 10终端运行jupyter notebook
命令时无法启动Jupyter Notebook.
错误信息
Traceback (most recent call last):
File “D:\python\Scripts\jupyter-notebook-script.py”, line 6, in
from notebook.notebookapp import main
File “D:\python\lib\site-packages\notebook\notebookapp.py”, line 46, in
from zmq.eventloop import ioloop
File “D:\python\lib\site-packages\zmq_init_.py”, line 47, in
from zmq import backend
File “D:\python\lib\site-packages\zmq\backend_init_.py”, line 40, in
reraise(*exc_info)
File “D:\python\lib\site-packages\zmq\utils\sixcerpt.py”, line 34, in reraise
raise value
File “D:\python\lib\site-packages\zmq\backend_init_.py”, line 27, in
ns = select_backend(first)
File “D:\python\lib\site-packages\zmq\backend\select.py”, line 27, in select_backend
mod = import(name, fromlist=public_api)
File "D:\python\lib\site-packages\zmq\backend\cython_init.py", line 6, in
from . import (constants, error, message, context,
ImportError: DLL load failed: 找不到指定的模块。
解决办法:
1.检查是不是在的虚拟环境中
若启动了python的虚拟环境,并在虚拟环境的命令行中运行jupyter notebook
是会出现上面DLL load failed
的错误的。
所以当要在虚拟环境中启动Jupyter Notebook。先要在虚拟环境中使用pip install jupyter
2.检查在配置环境变量
将下面的两个路径添加到环境变量中