运行测试文件后报错ImportError: DLL load failed while importing _ext: 找不到指定的模块。
这是因为mmcv的安装的不全
我开始使用的是下载到本地的轮子安装,就会报错
别用这个 把这个卸了 然后用下面的安装就好了
pip install mmcv-full=={mmcv_version} -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html
第一个括号里面写你想安装的mmcv版本,我想装1.5.1,我就写的1.5.1
第二个括号里面写你的cuda版本 我的是11.3,就写cu113
第三个括号里面写你的torch版本,我的是1.11.0,就写torch1.11.0
我输入的命令是下面这个,匹配我的torch版本和cuda版本
pip install mmcv-full==1.5.1 -f https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html
Looking in links: https://download.openmmlab.com/mmcv/dist/cu113/torch1.11.0/index.html
第二个和第三个括号不确定的话可以用这个命令看一下
python -c 'import torch;print(torch.__version__)'
我的看完就是这样的