python pip源

pipy国内镜像目前有:

  http://pypi.douban.com/  豆瓣

  http://pypi.hustunique.com/  华中理工大学

  http://pypi.sdutlinux.org/  山东理工大学

  http://pypi.mirrors.ustc.edu.cn/  中国科学技术大学

  

手动指定源:

在pip后面跟-i 来指定源,比如用豆瓣的源来安装web.py框架:

pip install web.py -i http://pypi.douban.com/simple

注意后面要有/simple目录!!!

配置文件

需要创建或修改配置文件(linux的文件在~/.pip/pip.conf,windows在%HOMEPATH%pippip.ini),修改内容为:

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

参考:

http://www.pip-installer.org/en/latest/configuration.html

原文地址:https://www.cnblogs.com/ccdc/p/4122641.html