OSError: [WinError 126] 找不到指定的模块Errorloading“torch\lib\caffe2_nvrtc.dll“ or one of its dependencies.

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

import torch

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

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++,都不行。

你可能感兴趣的:(pytorch,人工智能,python)