修改setup.py的源

方法一:

修改文件 ~/.pydistutils.cfg为:

[easy_install]

index_url = http://pypi.douban.com/simple

方法二:

直接在setup.py的同目录放置一个setup.cfg:

[easy_install]

index_url http://pypi.douban.com/simple

结:

 加上配置后python setup.py install安装的时候,依赖就会从douban的源下载了。

转自:http://everet.org/python-pypi-source.html

原文地址:https://www.cnblogs.com/pinganzi/p/4725458.html