Best Practice to Set Python Pip Install Timeout and Retry Times for Beginners – Python Tutorial

By | September 6, 2019

When we are installing python library with pip, we may encounter an pip timeout error. In this tutorial, we will introduce you how to avoid timeout error as much as possible.

python pip install timeout

Increate pip timeout value

We can use –timeout seconds argument to increase pip timeout value.

Here is an example to set pip timeout to 100 seconds

(py3) F:\>pip --timeout 100 install textract

textract is a python library.

However, pip will try to read url if it finds error. We also can set pip retry times.

Set pip retry times

Use –retries times argument to set pip retry times.

For example, if you set pip retry times to 10. You can do like this:

(py3) F:\>pip --timeout 100 --retries 10 install textract

Pip also has other arguments, you can view them by:

(py3) F:\>pip -h

Leave a Reply