美文网首页
DLL load failed while importing

DLL load failed while importing

作者: 廿怎么念 | 来源:发表于2020-09-06 13:05 被阅读0次

在装graphviz 和pydot 时不小心出了这个问题,在jupyter notebook中启动不了虚拟环境,试了网上很多方法都没解决,最后看错误信息发现应该是zmq加载的时候出错,同时参考这个帖子(点击),解决了这个问题。

完整的出错信息如下:

[I 11:38:38.992 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
Traceback (most recent call last):
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\ipykernel_launcher.py", line 15, in 
from ipykernel import kernelapp as app
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\ipykernel\__init__.py", line 2, in 
from .connect import *
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\ipykernel\connect.py", line 18, in 
import jupyter_client
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\jupyter_client\__init__.py", line 4, in 
from .connect import *
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\jupyter_client\connect.py", line 21, in 
import zmq
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\zmq\__init__.py", line 47, in 
from zmq import backend
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\zmq\backend\__init__.py", line 40, in 
reraise(*exc_info)
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\zmq\backend\__init__.py", line 27, in 
_ns = select_backend(first)
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "d:\ProgramData\Anaconda3\envs\mytensorflowGPU\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in 
from . import (constants, error, message, context,
ImportError: DLL load failed while importing error: 找不到指定的模块。

解决方法:在虚拟环境中重新安装pyzmq这个包

pip uninstall pyzmq
然后再
pip install pyzmq

相关文章

网友评论

      本文标题:DLL load failed while importing

      本文链接:https://www.haomeiwen.com/subject/zilcektx.html