When used today pip install a third library, and sometimes will complain:
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
Mirroring: pip install xxxx -i https://pypi.douban.com/simple follows:
pip install virtualenv -i https://pypi.douban.com/simple
Then you can replace domestic sources:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple module_name
or
pip install -i https://pypi.douban.com/simple module_name
The first installation is impossible to change the second try.
In fact, with the anaconda installation is faster, this problem does not occur
conda install module_name
To
The following is a complement to other users
PIP appears ReadTimeoutError under normal circumstances because of the GFW to the wall, so usually encounter this problem, we can choose a mirror image of the country to solve the problem.
In Windows:
New \ Users \ Administrator \ under pip folder, create pip.ini file, copy the code below into it, save: C.
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
In fact, the python source into the Tsinghua source, should be able to solve the problem.
2016.12.4 solution
The perfect extension of the waiting time to solve the problem
in cmd under the windows, linux enter the following command at the terminal:
pip --default-timeout=100 install -U pip