It is recommended to use the mirror: http://e.pypi.python.org. This is the IP of Beijing and will be much faster.
In addition, you can set a timeout = 6000 in the [global] block to avoid incomplete downloading of the installation package when the network is slow.
The addresses provided by many answers are either closed or redirected, and the new version must use https. It is recommended to use the above one for domestic mirrors. I personally do not recommend changing the source address by default to avoid security risks.
It is February 20, 2017. The most convenient source is https://pypi.tuna.tsinghua.ed... For example, pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu Soon, pip Same thing
Create a file ~/.pip/pip.conf with the following content
http://pypi.python.org/mirrors
It is recommended to use the mirror: http://e.pypi.python.org. This is the IP of Beijing and will be much faster.
In addition, you can set a timeout = 6000 in the [global] block to avoid incomplete downloading of the installation package when the network is slow.
You can also specify the installation source of a single library
Or try the v2ex source
Create the file pip.conf under ~/.pip/ (if you don’t have one already) and fill in the following content:
Regarding the new version of HTTP insecurity error, I will give you a template.
The addresses provided by many answers are either closed or redirected, and the new version must use https. It is recommended to use the above one for domestic mirrors.
I personally do not recommend changing the source address by default to avoid security risks.
Check the mirror activity in PyPI Mirror. Just select the appropriate image for the CN region.
The specific configuration method is as follows
Using a mirror
Single Usage:
Global settings:
Add ~/.pip/pip.conf that includes:
The above mainly talks about mirror, another option is proxy:
Posting some useful Pypi mirrors:
Douban
University of Science and Technology of China
It is February 20, 2017. The most convenient source is https://pypi.tuna.tsinghua.ed...
For example,
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu
Soon, pip Same thing
The latest news, Tsinghua University is closing the PyPi source