The PIP installation package is a common occurrence for Python development users. But foreign source download speed is too slow, waste of time. And there are frequent installation errors after downloading. Therefore, the PIP installation source to replace the domestic mirror, you can significantly improve the download speed, but also to improve the installation success rate. Domestic Sources:
New Ubuntu requires the use of HTTPS sources, should be noted.
Tsinghua: Https://pypi.tuna.tsinghua.edu.cn/simple
Ali Yun: http://mirrors.aliyun.com/pypi/simple/
https://pypi.mirrors.ustc.edu.cn/simple/of China University of Science and Technology
Huazhong University of Technology: http://pypi.hustunique.com/
Shandong Polytechnic University: http://pypi.sdutlinux.org/
Watercress: http://pypi.douban.com/simple/ Temporary use:
You can add parameters I-https://pypi.tuna.tsinghua.edu.cn/simple when using the PIP
For example: Pip install-i https://pypi.tuna.tsinghua.edu.cn/simple Pyspider, this will be from the Tsinghua side of the mirror to install Pyspider library.
permanently modified, once and for all:
Under Linux, modify ~/.pip/pip.conf (without creating a folder and file.) Folder to add "." to indicate that it is a hidden folder
The contents are as follows:
[Global]
Index-url = Https://pypi.tuna.tsinghua.edu.cn/simple
[Install]
Trusted-host=mirrors.aliyun.com
Under Windows, create a PIP directory directly in the user directory, such as: C:\Users\xx\pip, new file Pip.ini. Content ditto.