修改setup.py的源
方法一:
修改文件 ~/.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
结:
加上配置后python setup.py install安装的时候,依赖就会使用清华源下载了。
转自:http://everet.org/python-pypi-source.html