此问题一般为torch版本太高,本人安装的pytorch是最新版本,cuda是11.5
测试pytorch环境
import torch 报错:Error 126,找不到指定模块
一定对应pytorch,conda虚拟环境中的python版本,cuda版本
conda install pytorch==1.10.0 torchvision==0.11.0 torchaudio==0.10.0 cudatoolkit=11.3 -c pytorch -c conda-forge
在官网下载降低一个版本后,问题解决!