这几天想试一下mmdetection做目标检测,使用setup进行安装的时候,发现下载各种库还是使用默认的https://pypi.python.org/simple/来下载各种库,外网下载库大家都懂的,想办法把源换成国内镜像。我使用了下面的第二种,把源改成了清华源,亲测有效。记录一下:
参考了这个方法http://ju.outofmemory.cn/entry/104763
方法一:
修改文件 ~/.pydistutils.cfg为:
[easy_install]
index_url = https://pypi.tuna.tsinghua.edu.cn/simple
方法二:
直接在setup.py的同目录放置一个setup.cfg:
[easy_install]
index_url = https://pypi.tuna.tsinghua.edu.cn/simple