Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Fixing Pip Timeout Problems

Python DevOps #pip #TensorFlow #Troubleshooting

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