Pip Connecttimeouterror

Pip Connecttimeouterror

When trying to install something using pip I am getting a ConnectTimeoutError error ! For example, when I try:

pip install 'something'

The following error occurs:

Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(, 'Connection to 'some dev server' timed out. (connect timeout=15)')': /.../.../

Is my pip behind some proxy?

4

1 Answer

To clarify, by default pip installs software from . However, pip can be configured to use a different server.

It seems like you are not able to reach the PyPI server that your pip is trying to use. In your error message you have the string 'Connection to 'some dev server' timed out.. If I see that correctly, your pip is trying to connect to a local PyPI server instead of the public one.

This post and this one describe how to set up a custom PyPI server. Both describe different ways to tell pip which server to use.

.pip/pip.conf

In this config file you can specify an index-url which points to a custom server. Check if this file exists and has a value for index-url that does not point to . The example given in the first post looks like this:

[global]
index-url = 

This tells pip to not use the public PyPI server, but the one at .

.pypirc

This file that should sit in your home folder can also contain alternative paths to PyPI servers. They can look like this (taken from second link):

[distutils]
index-servers =
    internal

[internal]
repository: 
username: username
password: password

This one points to the local server under the name internal. Check if this file is present and its content.

What to do?

If you find the local PyPI server, find out who runs it and if it is currently running. This error can arise if the server process stopped or the machine it usually runs on is down. Any advice more specific than that would require more information from your side on your work environment.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.