Because the foreign PIP source is always due to various reasons can not be accessed or slow speed, and caused by timeout error
The workaround is to modify the PIP profile (if no configuration file is created in the appropriate location, the path and name of the profile is referenced here), set the image to be accessed by the installation package, and change it to a domestic mirror
Then set the timeout to a bit longer
For example, the configuration file settings are as follows:
[Global]
Timeout = 60
Index-url = Http://pypi.douban.com/simple
[Install]
Use-mirrors = True
Mirrors = http://pypi.douban.com
How to confirm that you have successfully modified the source image used in PIP installation package, as long as the use of the PIP command to see the download speed is obvious.
Reference:
https://segmentfault.com/q/1010000000162410
Change the image of the PIP installation source to resolve the installation always timeout condition