我正在尝试在 Python 中使用 NumPy。我刚刚安装了 Anaconda Python 3.7,一切似乎都很顺利。但是,我无法导入 numpy(使用行import numpy)。当我这样做时,出现以下错误:
C:\Users\jsmith\anaconda3\lib\site-packages\numpy\__init__.py:140: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import _distributor_init
Traceback (most recent call last):
File "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\core\__init__.py", line 24, in <module>
from . import multiarray
File "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\core\multiarray.py", line 14, in <module>
from . import overrides
File "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: DLL load failed: The specified module 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 "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\core\__init__.py", line 54, in <module>
raise ImportError(msg)
ImportError:
我可以在 Anaconda Navigator 的环境选项卡中看到它,当我尝试在 Eclipse(Pydev) 中使用它时,它显示在强制内置函数下。我查看了我的 PYTHONPATH,我在 Eclipse 中的环境和我的基本 python 目录 (jsmith/anaconda3) 都在其中。我已经尝试导入我在强制内置函数下看到的其他库,这些库工作正常,但 numpy 似乎是唯一有问题的库。打电话pip install numpy告诉我它已经安装了 1.18.1 版本。我查看了这个conda create -n test numpy python=3.7 --no-default-packages堆栈溢出页面,并在 anaconda 提示符下运行了 answer() 中的第一个命令。这行得通,然后我意识到测试是针对这个问题的,于是尝试了 base,但得到了这个错误:
CondaValueError: The target prefix is the base prefix. Aborting.
然而打电话conda activate base什么也没做。
宝慕林4294392
慕沐林林
素胚勾勒不出你
相关分类