在学习李铎博士‘CVPR 2021 | Involution:超越卷积和自注意力的神经网络新算子’文章中(原文),作者提供的代码中包含mmcv库,所提供的GitHub链接(官网)总是无法安装,偶然在Python Free上寻找了方法,故转载过来以作记录。(原文链接)
其原文如下:
一、环境问题
报错一:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
解决:安装pytest-runner
pip install pytest-runner
报错二:Command “python setup.py egg_info” failed with error code 1
解决:更新pip和setuptools
python -m pip install --upgrade pip -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
python -m pip install --upgrade setuptools -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
二、安装mmcv
参考地址: https://www.pythonf.cn/read/158993
需要c++14编译环境,可通过安装visualstudio2019等安装c++环境;
pip install mmcv -i http://pypi.douban.com/simple --trusted-host pypi.douban.com