Skip to content


Subversion checkout URL

You can clone with
Download ZIP


pip should suggest using mirrors on timeout #796

mrkafk opened this Issue · 3 comments

3 participants


Few people pay attention to mirrors or even know about them. It appears that in current pip version "pip --help" does not even mention mirrors.

When getting a timeout or even slow download pip could suggest configuring mirrors and specifying link/redirect to pip.ini with:

timeout = 60

has done wonders to my download speed so why not just catch timeout exception and print short instruction?


I could also make a patch if you want since it seems simple, here's exception:

Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip-1.2.1-py2.7.egg\pip\", line 107, in main
status =, args)
File "C:\Python27\lib\site-packages\pip-1.2.1-py2.7.egg\pip\commands\", line 256, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python27\lib\site-packages\pip-1.2.1-py2.7.egg\pip\", line 1018, in prepare_files
self.unpack_url(url, location, self.is_download)
File "C:\Python27\lib\site-packages\pip-1.2.1-py2.7.egg\pip\", line 1142, in unpack_url
retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
File "C:\Python27\lib\site-packages\pip-1.2.1-py2.7.egg\pip\", line 463, in unpack_http_url
download_hash = _download_url(resp, link, temp_location)
File "C:\Python27\lib\site-packages\pip-1.2.1-py2.7.egg\pip\", line 380, in _download_url
chunk =
File "C:\Python27\lib\", line 380, in read
data = self._sock.recv(left)
File "C:\Python27\lib\", line 561, in read
s =
File "C:\Python27\lib\", line 380, in read
data = self._sock.recv(left)
timeout: timed out


pip install -h will show 2 options related to mirrors.
in the latest unreleased version of pip, those 2 options are in separate "Package Index Options" group.
here they are on the online help.

adding a cookbook entry might be nice:

I'm open to the suggestion of adding the timeout message.


I'm going to close this ticket. The mirrors as implemented are highly insecure and with the new CDN using them is unlikely to be what a person actually wants to do.

@dstufft dstufft closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.