Reference: http://www.cnblogs.com/yudar/p/4444097.html
Installing third-party libraries with Easy_install and Pip is convenient
They are actually downloaded from the official Python source Pypi.python.org/pypi to the local, then unpacked and installed.
But for some reason, access to the official PyPI is unstable, slow or even inaccessible.
As with Ubuntu's apt and CentOS's yum, there are various image sources like PyPI.
PIPY Domestic Mirror currently has:
http://pypi.douban.com/Watercress
http://pypi.hustunique.com/Huazhong University of Technology
http://pypi.sdutlinux.org/Shandong University of Technology
http://pypi.mirrors.ustc.edu.cn/China University of Science and Technology
This is a convenient way to install the PIP online, but it's a terrible thing to do when the network is unstable. The use of domestic mirrors is relatively good,
If you want to specify the source manually, you can specify the source by following the PIP with-I, such as installing the web.py frame with the source of the watercress:
Pip Install Web.py-i http://pypi.douban.com/simple
Note that there is a/simple directory behind!!!
The source of the highly recommended watercress in the country
http://pypi.douban.com/simple/
Note that there are/simple directories to follow.
Using the image source is simple, specifying it with-I is OK:
Easy_install-i http://pypi.douban.com/simple/gevent
Pip Install-i http://pypi.douban.com/simple/gevent
If it feels too troublesome, it can be formulated as default:
Under Linux, modify the ~/.pip/pip.conf, if not this file is created.
Under Windows, modify%homepath%\pip\pip.ini.
The contents are:
[Global]
Index-url = Http://pypi.douban.com/simple
This source is used by default when you use Pip to install.
The command is as follows:
sudo pip install scipy==0.10.1-i http://pypi.douban.com/simple--trusted-host pypi.douban.com
PIP command accelerates online installation using a domestic pypi image source