我看很多教程说mmcv是只支持linux,支持windows版本较少,所以很难和torch、cuda匹配上,所以报错较多难安装。今天试了一下,遇到的和想到的报错问题基本如下:
一、首先是Microsoft Visual C++ 14.0 is required:
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/ Tools":
建议是直接离线包下载安装:
离线包我这里给大家一个百度网盘的连接,大家自行下载即可
链接:https://pan.baidu.com/s/1ytKIVSBXLMQhrXleC_I4dA
提取码:8scp
二、直接pip install一片红
这是github上官方推荐的方法,然后pycharm直接报错:
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- mmcv
Current channels:
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
.......
建议是先安装mmcv离线包,然后再装mmdet
安装如果继续报错,查看报错代码中是否存在上一个问题
三、MMCV和MMDET都安装成功了,运行报错importError
ImportError: DLL load failed: 找不到指定的模块
这个一般是说加载动态链接库有问题,先查看是否能import mmcv
和import mmdet
如果成功,说明应该是版本不匹配,去查看自己torch和cuda版本,然后看一下mmdet和mmcv版本匹不匹配,再去离线包地方下载相应版本的库。离线版本教程在后面
如果失败,说明库根本没安装到位,去pip list下看一看是否装上。
给出mmdet版本和mmcv版本对应图:
MMDetection 版本 MMCV 版本 master mmcv-full>=1.3.17,
Original: https://www.cnblogs.com/cs-markdown10086/p/16001953.html
Author: NEU_ShuaiCheng
Title: 目标检测常用库MMCV安装中遇到的问题总结
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/714851/
转载文章受原作者版权保护。转载请注明原作者出处!