【问题标题】:Import NumPy gives me ImportError: DDL load failed: The specified procedure could not be found?Import NumPy 给我 ImportError: DLL load failed: The specified procedure could not be found?
【发布时间】:2017-06-22 12:11:06
【问题描述】:

我的环境:Win10 64 位,Python 3.6,我使用 pip install 来安装 NumPy 而不是 Anaconda。 NumPy 版本:1.13.0

我看到几个人发布了类似的问题,但他们中的大多数人都使用 Python 2.7。到目前为止我看到的最接近的解决方案是:https://github.com/ContinuumIO/anaconda-issues/issues/1508https://github.com/numpy/numpy/issues/9272。但似乎他们最终没有解决它,发布它的人使用的是 Python 2.7。因此,我想知道是否有人可以帮助我解决这个问题。我的错误日志如下。任何帮助将不胜感激。

C:\Users\Kevin>python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "D:\Python3.6\lib\site-packages\numpy\core\__init__.py", line 16, in 
<module>
from . import multiarray
ImportError: DLL load failed: The specified procedure could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Python3.6\lib\site-packages\numpy\__init__.py", line 142, in 
<module>
    from . import add_newdocs
  File "D:\Python3.6\lib\site-packages\numpy\add_newdocs.py", line 13, in 
<module>
    from numpy.lib import add_newdoc
  File "D:\Python3.6\lib\site-packages\numpy\lib\__init__.py", line 8, in 
<module>
    from .type_check import *
  File "D:\Python3.6\lib\site-packages\numpy\lib\type_check.py", line 11, in 
<module>
    import numpy.core.numeric as _nx
  File "D:\Python3.6\lib\site-packages\numpy\core\__init__.py", line 26, in 
<module>
    raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: DLL load failed: The specified procedure could not be 
found.

【问题讨论】:

标签: python python-3.x numpy pip


【解决方案1】:

您应该对 numpy 进行全新安装。只是不要使用传统方式,而是下载轮文件。您可以从此处获取轮文件:http://www.lfd.uci.edu/~gohlke/pythonlibs/。下载这个文件-numpy‑1.13.0+mkl‑cp36‑cp36m‑win_amd64.whl 并使用 pip 安装这个轮子。通过从 shell 导入 numpy 来检查。

【讨论】:

  • 是的,我认为这是由于一些兼容性问题,因为当我回滚版本时,它工作正常。
  • 它解决了您的问题吗?如果可以,你能接受我的回答吗?谢谢
【解决方案2】:

如果您不想费心寻找轮文件,只需卸载 numpy 并安装旧版本:

pip3 uninstall numpy
pip3 install 'numpy<1.13'

【讨论】:

    【解决方案3】:

    卸载 NumPy 并在该类型之后:

    pip3 install numpy==1.12
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-10-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-18
      相关资源
      最近更新 更多