验证环境:win10+vs2017+cuda10.2+cudnn7.6+pytorch1.6+mmcv-full
pip安装mmcv报错:
1)错误1
WARNING: The repository located at yum.tbsite.net is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS
instead, otherwise you may silence this warning and allow it anyway with '--trusted-host yum.tbsite.net'. ERROR: Could not find a version that satisfies the requirement pytest-runner (from versions: none)
对于上面这个错误,通过阅读错误提示发现,少了一个依赖项pytest-runner:
pip install pytest-runner
安装了这个依赖项后,再安装mmcv这个第三方包就没问题了。
参考:https://www.cnblogs.com/loveprogramme/p/12579277.html
2)错误2
No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v10.2' Compiling mmcv._ext without CUDA
未设置cuda_home环境变量。解决办法,在cmd终端输入:
set CUDA_HOME = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\"
3)错误3
编译错误,找不到cl编译器。添加vs编译器路径进环境变量Path
D:\programs\VS2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx86\x64
执行安装:
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.6.0/index.html