简体   繁体   English

将Numpy导入Python:“ ImportError:DLL加载失败:找不到指定的过程。”

[英]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:

  1. mkl_core.dll mkl_core.dll
  2. mkl_intel_thread.dll- mkl_intel_thread.dll-
  3. mkl_def mkl_def
  4. libiomp5md.dll libiomp5md.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发生冲突,它存在于两个位置:

  • C:\\Windows\\System32\\libiomp5md.dll C:\\ Windows \\ System32 \\ libiomp5md.dll
  • C:\\Anaconda3\\Library\\bin\\libiomp5md.dll C:\\ Anaconda3 \\ Library \\ bin \\ 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.

相关问题 ImportError:DLL加载失败:找不到指定的过程。蟒蛇 - ImportError: DLL load failed: The specified procedure could not be found. Python NumPy 库导入错误:DLL 加载失败:找不到指定的程序 - NumPy library ImportError: DLL load failed: The specified procedure could not be found 导入 Dash 时出错:“ImportError: DLL load failed while importing _brotli: The specified module could not be found.” - Error when importing Dash: "ImportError: DLL load failed while importing _brotli: The specified module could not be found." python错误ImportError:DLL加载失败:找不到指定的过程。 __load中的文件“ psycopg2 \\ _psycopg.pyc”,第10行 - python error ImportError: DLL load failed: The specified procedure could not be found. File “psycopg2\_psycopg.pyc”, line 10, in __load 导入 tensorflow 时,出现错误“导入错误:DLL 加载失败:找不到指定的模块。” - While importing tensorflow, got the error 'ImportError: DLL load failed: The specified module could not be found.' 在pycharm ImportError中:DLL加载失败:找不到指定的模块。 导入人脸识别时 - In pycharm ImportError: DLL load failed: The specified module could not be found. while importing facerecognition “ImportError: DLL load failed while importing mariadb: The specified module could not be found”的解决方法。 - Workaround for “ImportError: DLL load failed while importing mariadb: The specified module could not be found.” ImportError:DLL加载失败:找不到指定的模块。 在pycharm中导入cv2时 - ImportError: DLL load failed: The specified module could not be found. when importing cv2 in pycharm from matplotlib import ft2font: “ImportError: DLL load failed: The specified procedure could not be found.” - from matplotlib import ft2font: “ImportError: DLL load failed: The specified procedure could not be found.” 导入 pptx 时出错“导入错误:DLL 加载失败:找不到指定的过程。” - Error when Import pptx "ImportError: DLL load failed: The specified procedure could not be found."
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM