gpt4 book ai didi

python - NumPy 库导入错误 : DLL load failed: The specified procedure could not be found

转载 作者:太空狗 更新时间:2023-10-30 00:01:30 29 4
gpt4 key购买 nike

我正在 Windows 10 上使用 Visual Studio 2017 学习 python。当我尝试将 NumPy 库导入我的代码时,出现此错误。我已尝试卸载并重新安装,在 ImportError: DLL load failed when importing Numpy installed in conda virtual environment 中按照指令查找 libiomp5md.dll但没有占上风。

Traceback (most recent call last):
File "C:\Program Files\Python36\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 "C:\Users\adm\documents\visual studio 2017\Projects\Web Scraping\Web Scraping\Web_Scraping.py", line 17, in <module>
import numpy
File "C:\Program Files\Python36\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\Program Files\Python36\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Program Files\Python36\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\Program Files\Python36\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Program Files\Python36\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.

最佳答案

我用VSCode遇到了同样的问题,我通过在系统环境中添加如下路径解决。之后重启 VSCode,一切正常。

C:\Users\<Your user name>\Anaconda3\Library\bin

如果默认目录下没有安装anaconda,请自己找Anaconda3\Library\bin .

关于python - NumPy 库导入错误 : DLL load failed: The specified procedure could not be found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44537131/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com