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