导入torch报错ackages\torch\lib\asmjit.dll

运行程序时报错:

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
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\chentingting1\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\__init__.py", line 128, in <module>
    raise err
OSError: [WinError 126] 找不到指定的模块。 Error loading "C:\Users\chentingting1\AppData\Local\Programs\Python\Python37\lib\site-packages\torch\lib\asmjit.dll" or one of its dependencies.

有解决方法是升级numpy库,对我并不管用
是安装的torch版本太高,降低版本,你的torch版本与python 版本不匹配,
安装torch1.2对应python3.6

猜你喜欢

转载自blog.csdn.net/qq_35037684/article/details/113978989
今日推荐