Jupyter notebook failed to load DLL

筅森魡賤 提交于 2020-08-27 06:16:11

问题


When i am starting jupyter notebook from cmd prompt i get following error

C:\Users\Ganesh>jupyter notebook
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 46, 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: The specified module could not be found.

I had set following paths in system variable

C:\ProgramData\Anaconda3
C:\ProgramData\Anaconda3\Scripts
C:\ProgramData\Anaconda3Scripts\jupyter

Did i missed any path to add in system variables (OS version Windows 10)


回答1:


Try to add the following directories to your env path as well: C:\ProgramData\Anaconda3\Library\mingw-w64\bin C:\ProgramData\Anaconda3\usr\bin C:\ProgramData\Anaconda3\Library\bin




回答2:


This happened to me when creating a new environment with the latest anaconda package (at the time of my answer at least). The folder zmq in the base environment ([1] .../Anaconda3/Lib/site-packages/zmq) was correct, it was actually the folder zmq in the new environment ([2] {python_env_dir}/{env}/.../site-packages/zmq) that was corrupted.

Solution: I deleted the folder [2], and I copied the folder [1] in the previous place of the folder [2]. And this issue was solved for me.




回答3:


First enter activate base

then enter jupyter notebook

This works for me




回答4:


yes, what @mountrix said was the case also when the error happened to me. this one fixes it in the most simple way (answer from Alex W): https://stackoverflow.com/a/54225033/12107973



来源:https://stackoverflow.com/questions/52821162/jupyter-notebook-failed-to-load-dll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!