python-Configuring the PIP source

Source: Internet
Author: User
Tags virtualenv

You can configure the path to the PIP Source:
Three different forms:
1.per-user:
UNIX Default configuration fileHOME/.CONFIG/PIP/PIP.COnfm ac O Home/library/application support/pip/pip.conf
HOME/.CONFIG/PIP/PIP.COnF( if fruit Home/library/application support/pip/not present)
Windows:%appdata%\pip\pip.ini
Legacy per-user Config file (Legacy per-user configuration method):
UNIX: $HOME/.pip/pip.conf
Windows:%home%\pip\pip.ini

2.Inside a virtualenv:
Unix and MacOS: $VIRTUAL _env/pip.conf
Windows:%virtual_env%\pip.ini

3.site-wide:
Unix:/etc/pip.conf
Macos:/library/application support/pip/pip.conf
Windows xp:c:\documents and Settings\All Users\Application Data\pip\pip.ini
Windows7 or after: C:\ProgramData\pip\pip.ini

System Read Order (note that the front is overwritten):

1.Firstly the site-wide file is read, then2.The per-user file is read, and finally3.The virtualenv-specific file is read.

The author uses the Windows7, the Pip.ini is configured under%appdata%\pip\.
If you are not sure where%appdata% is, you can enter CMD and type the SET command.
:

Create the Pip folder under%appdata%\ and create a Pip.ini text file under the Pip folder.

Where Index-url specifies the PIP source IP address
The author uses the source of Tsinghua University. The domestic more useful sources are:
pypi.python.org official source
Pypi.douban.com Watercress Source, Fuzhou
Pypi.hustunique.com Huazhong University of Science and Technology source, Wuhan
pypi.tuna.tsinghua.edu.cn Tsinghua Source, Beijing

http://pypi.mirrors.ustc.edu.cn/simple/China University of Science and Technology

You can manually specify the source if it is not too troublesome
Pip Install-i xx (where xx is the specified source IP address)

Reference URL:
https://pip.pypa.io/en/latest/user_guide/

python-Configuring the PIP source

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.