[英]Importing Numpy to Python: “ImportError: DLL load failed: The specified procedure could not be found.”
Importing numpy gives me the error: 导入numpy给我错误:
ImportError: DLL load failed: The specified procedure cold not be found.
Here is the traceback: 这是回溯:
Traceback (most recent call last):
File "<ipython-input-4-5a0bd626bb1d>", line 1, in <module>
import numpy
File "C:\...\Anaconda3\lib\site-packages\numpy\__init__.py", line 180, in <module>
from . import add_newdocs
File "C:\...\Anaconda3\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\...\Anaconda3\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\...\Anaconda3\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\...\Anaconda3\lib\site-packages\numpy\core\__init__.py", line 14, in <module>
from . import multiarray
This is a fresh install of Anaconda, and I have updated numpy to the latest version. 这是Anaconda的全新安装,并且我已经将numpy更新为最新版本。 Any ideas what could be going wrong?
任何想法可能出什么问题吗?
Well, I was in the same boat, and I managed to fix it as Rafael Monteiro said but including some other DLLs listed below: 好吧,我当时在同一条船上,我设法按照拉斐尔·蒙泰罗(Rafael Monteiro)所说的来修复它,但包括下面列出的一些其他DLL:
Those in were quite smaller than the ones in Python Library\\bin directory so I assume those didn't have some functions defined, hence the errors while loading numpy. 中的那些要比Python Library \\ bin目录中的要小得多,因此我认为这些没有定义函数,因此在加载numpy时出错。
I'm not sure why were those installed but it was just after a Windows Update followed by a device driver installation. 我不确定为什么要安装这些驱动程序,但这只是在Windows Update之后安装设备驱动程序之后才进行的。
I do not think the OP would still be interested as the question is a year old but I will leave this here as it will save some time for someone in the future. 由于问题已经存在一年了,所以我认为OP仍然不会对此感兴趣,但是我将其保留在这里,因为这将为将来的某个人节省一些时间。
For the record, I had the same error here (Python 3.5 64-bit on Windows 10), and this page helped me find the solution. 作为记录,我在这里遇到了相同的错误(Windows 10上为Python 3.5 64位),并且此页面帮助我找到了解决方案。 The problem was a conflict with
libiomp5md.dll
, which existed on two locations: 问题是与
libiomp5md.dll
发生冲突,它存在于两个位置:
Python was trying to use the version in System32 folder, which was an old version. Python试图使用System32文件夹中的版本,该版本是旧版本。 I removed it (renamed) and now it uses the correct version, on Anaconda3 folder, and now I can import numpy without the import error.
我删除了它(重命名),现在它在Anaconda3文件夹上使用了正确的版本,现在我可以导入numpy了,而不会出现导入错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.