淘先锋技术网

首页 1 2 3 4 5 6 7

import torch

x = torch.empty(5, 3)

print(x)

报错

D:\Anaconda\anaconda3\python.exe D:/Python1自学/pythonProject/唐宇迪老师/4.基操.py

Traceback (most recent call last):

File "D:\Python1自学\pythonProject\唐宇迪老师\4.基操.py", line 1, in <module>

import torch

File "D:\Anaconda\anaconda3\lib\site-packages\torch\__init__.py", line 139, in <module>

raise err

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

Process finished with exit code 1

在线求指导,网上的方法都试过了,重装CUDA,anaconda,pytorch,都试过,还有下载VC++,都不行。