import torch 报错:OSError: [WinError 126] 找不到指定的模块

安装完pytorch1.6之后,想测试下pytorch有没有安装成功,import torch之后,结果报错:

Microsoft Visual C++ Redistributable is not installed, this may lead to the DLL load failure.
It can be downloaded at https://aka.ms/vs/16/release/vc_redist.x64.exe

---------------------------------------------------------------------------
OSError   Traceback (most recent call last)
<ipython-input-1-eb42ca6e4af3> in <module>
----> 1 import torch

E:\Softwares\anaconda3\envs\RL36\lib\site-packages\torch\__init__.py in <module>
    125                 err = ctypes.WinError(ctypes.get_last_error())
    126                 err.strerror += ' Error loading "{}" or one of its dependencies.'.format(dll)
--> 127                 raise err
    128 
    129     kernel32.SetErrorMode(prev_error_mode)

OSError: [WinError 126] 找不到指定的模块。 Error loading "E:\Softwares\anaconda3\envs\RL36\lib\site-packages\torch\lib\asmjit.dll" or one of its dependencies.

错误开头就提示了 “xxxxxx 没有安装”
所以我就安装了这个程序,然后重新运行就可以了!

你可能感兴趣的:(python,python)