ImportError: DLL load failed: 找不到指定的模块。

解决Windows下cmd命令jupyter notebook启动该Anaconda报错: ImportError: DLL load failed: 找不到指定的模块。

 


 

一、报错信息

报错信息

_cffi_ext.c
D:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(213): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
Traceback (most recent call last):
  File "D:\ProgramData\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
    from notebook.notebookapp import main
  File "D:\ProgramData\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 47, in <module>
    from zmq.eventloop import ioloop
  File "D:\ProgramData\Anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module>
    from zmq import backend
  File "D:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "D:\ProgramData\Anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
    raise value
  File "D:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "D:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "D:\ProgramData\Anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: DLL load failed: 找不到指定的模块。

  

 

 

 

二、解决方案

确保将Anaconda的相关路径添加到系统环境变量中。

2.1 将Anaconda安装目录添加到系统环境变量

  示例:D:\ProgramData\Anaconda3

2.2 将Anaconda下的Library\bin添加到系统环境变量

  示例:D:\ProgramData\Anaconda3\Library\bin

 

 

 

 

参考博客:

 

 

1. Jupyter Notebook无法启动: DLL load failed

 

——END——

 


 

 

posted @ 2020-02-20 14:28  langkye  阅读(6579)  评论(0编辑  收藏  举报