gpt4 book ai didi

python - 导入错误 : DLL load failed when importing Numpy installed in conda virtual environment

转载 作者:IT老高 更新时间:2023-10-28 21:08:37 25 4
gpt4 key购买 nike

在 Windows 中,我使用命令创建了一个 Conda 虚拟环境

conda create -n test python=2.7 pandas scipy matplotlib numpy

创建后,我激活了虚拟环境并进入了 python 解释器。尝试导入 numpy 时,出现以下错误:

>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Anaconda3\envs\test\lib\site-packages\numpy\__init__.py", line 180, in <module>
from . import add_newdocs
File "C:\Anaconda3\envs\test\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Anaconda3\envs\test\lib\site-packages\numpy\lib\__init__.py", line 8,
in <module>
from .type_check import *
File "C:\Anaconda3\envs\test\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\Anaconda3\envs\test\lib\site-packages\numpy\core\__init__.py", line 14, in <module>
from . import multiarray
ImportError: DLL load failed: The specified module could not be found.

有什么想法吗?谢谢!

最佳答案

卸载并重新安装 numpy。

pip uninstall numpy
pip install numpy

然后再次尝试导入,它应该可以工作。我就是这么做的

关于python - 导入错误 : DLL load failed when importing Numpy installed in conda virtual environment,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36778066/

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