pipy国内镜像目前有:

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

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

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

  http://pypi.mirrors.ustc.edu.cn/  中国科学技术大学
 使用镜像的方法可以在每次执行pip的时候加上参数"-i http://e.pypi.python.org/simple"即可,

或者也可以在本地配置,这样就不用每次都加上参数了,

使用pip的用户可以如下配置:

在unix和macos,配置文件为:$HOME/.pip/pip.conf

在windows上,配置文件为:%HOME%\pip\pip.ini

需要在配置文件内加上:

[global]

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

 新的版本中会在非https传输的镜像站上报出如下错误:

    This repository located at pypi.douban.com is not a trusted host, if this repository is available via HTTPS it is recommend to use HTTPS instead, otherwise you may silence this warning with ‘–trusted-host pypi.douban.com’.

    DEPRECATION: Implicitly allowing locations which are not hosted at a secure origin is deprecated and will require the use of –trusted-host in the future.

    Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages

解决办法就是:

编辑$HOME/.pip/pip.conf

[global]

trusted-host=pypi.douban.com
index-url=http://pypi.douban.com/simple/