[Solved] pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=’files.pythonhosted.org’,

I encountered a problem when installing the module today

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host=’files.pythonhosted.org’,

For specific information, see the figure below

After checking the information on the Internet, I found that the error was reported due to the instability of the network:

The following solutions can be used to solve the problem:

Option 1: Delayed installation

pip install --default-timeout=1000 "Installed module name"

Option 2: Install using a mirror website

# Tsinghua source

pip install "module name" -i https://pypi.tuna.tsinghua.edu.cn/simple

# Doubanyuan
pip install "module name" -i https://pypi.douban.com/simple

Option 3: Add and modify the configuration source

# First upgrade pip to the latest version
pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# If you have poor network connection to pip's default source, temporarily use this mirror to upgrade pip:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U

Tsinghua source documents

Option 4: Agent

pip install -i http://pypi.douban.com/simple --proxy http://ip:port numpy

The above points are summarized, I hope it will be useful to you