如图:

D:\anaconda3\envs\cs324\lib\site-packages\numpy\__init__.py:148: 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 "D:\anaconda3\envs\cs324\lib\site-packages\numpy\core\__init__.py", line 22, in <module>
    from . import multiarray
  File "D:\anaconda3\envs\cs324\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
    from . import overrides
  File "D:\anaconda3\envs\cs324\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: DLL load failed: 找不到指定的模块。

原因:使用指令安装导致:

# Please run the command in Anaconda Powershell Prompt or Anaconda Prompt.
conda activate cs324
# cpu only
conda install pytorch torchvision cpuonly -c pytorch
# gpu cuda 10.1
conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
# when you install PyTorch, numpy will be installed automatically.
# Now you only need to install other packages.
conda install matplotlib
conda install scipy
conda install scikit-learn
conda install jupyter

用pip uninstall 下载的包之后,再用pip install之后就好了。

从conda指令直接安装往往结果很奇怪。

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐