Reference: http://pip.readthedocs.io/en/latest/user_guide/#config-file
PyPI in the domestic watercress source address is as follows:
http://pypi.douban.com/simple/
Note that there are/simple directories to follow.
Use a specific image source deliberately specified with the-i parameter, for example: we want to use the Watercress pypi source download BeautifulSoup, you can enter the command to download:
sudo easy_install-i http://pypi.douban.com/simple/beautifulsoup
sudo pip install-i http://pypi.douban.com/simple/beautifulsoup
The principle of Easy_install and Pip install is actually to download the source code from Fu'an to local, and then execute the Python setup.py install operation.
However, it is cumbersome to add a-i parameter and URL for each download.
So we can edit the%home%\pip\pip.ini in Linux edit ~/.pip/pip.conf or under Windows, the following:
[Global]
Index-url = Http://pypi.douban.com/simple
This is to change the default PyPI source to a watercress source, instead of having to use the-I parameter each time the PIP install is specified.
Python Pypi Modify the domestic source (take the watercress source as an example)