python修改pip和easy_install的源服务器地址


官网因为XXX原因弄得慢得不像个样,简直不是网络,和雾霾天气没二样。所以必须要切换到我们敬爱的豆瓣官网提供的pypi源,谢谢豆瓣。 修改就简单了,easy_install需要建个文件, ~/.pydistutils.cfg 然后加入以下内容即可。


[easy_install]
index_url = http://pypi.douban.com/simple

pip需要个~/.pip/pip.conf,加入内容。


[global]
index-url = http://pypi.douban.com/simple

Share this post

Enjoyed reading? Share it with your friends or colleagues!