Python Pypi Modify the domestic source (take the watercress source as an example)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.