Posted on :: Tags: , ,

When installing a large package like TensorFlow, I encountered the following error in pip:

pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

    v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

I noticed that pip has a --default-timeout parameter that can be configured to avoid this issue:

pip --default-timeout=1000 install package-name