3

I'm unable to install any python package using pip. Everything used to work perfectly until a few days back. But now I get the following errors while installing. I think the issue is because of the URLs that pip uses to fetch the wheel packages. Now I install all these packages by manually downloading the package wheels, but it's very cumbersome task.

Python version: 3.5.2, OS: Ubuntu 16.04

Command: pip -v install pandas

Log:

Created temporary directory: /tmp/pip-ephem-wheel-cache-qfdazbyv
Created temporary directory: /tmp/pip-install-sew6kypd
Collecting pandas
  1 location(s) to search for versions of pandas:
  * https://pypi.python.org/simple/pandas/
  Getting page https://pypi.python.org/simple/pandas/
  Looking up "https://pypi.python.org/simple/pandas/" in the cache
  Returning cached "301 Moved Permanently" response (ignoring date and etag information)
  Looking up "https://pypi.org/simple/pandas/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/pandas/
  Starting new HTTPS connection (2): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/pandas/
  Starting new HTTPS connection (3): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/pandas/
  Starting new HTTPS connection (4): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/pandas/
  Starting new HTTPS connection (5): pypi.org
  Incremented Retry for (url='/simple/pandas/'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))': /simple/pandas/
  Starting new HTTPS connection (6): pypi.org
  Could not fetch URL https://pypi.python.org/simple/pandas/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pandas/ (Caused by ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))) - skipping
  Could not find a version that satisfies the requirement pandas (from versions: )
Cleaning up...
No matching distribution found for pandas
Exception information:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/basecommand.py", line 228, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/commands/install.py", line 291, in run
    resolver.resolve(requirement_set)
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/resolve.py", line 103, in resolve
    self._resolve_one(requirement_set, req)
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/resolve.py", line 257, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/resolve.py", line 210, in _get_abstract_dist_for
    self.require_hashes
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/operations/prepare.py", line 243, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/req/req_install.py", line 307, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/local/lib/python3.5/dist-packages/pip/_internal/index.py", line 533, in find_requirement
    'No matching distribution found for %s' % req
pip._internal.exceptions.DistributionNotFound: No matching distribution found for pandas
1 location(s) to search for versions of pip:
* https://pypi.python.org/simple/pip/
Getting page https://pypi.python.org/simple/pip/
Looking up "https://pypi.python.org/simple/pip/" in the cache
Returning cached "301 Moved Permanently" response (ignoring date and etag information)
Looking up "https://pypi.org/simple/pip/" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.org
Could not fetch URL https://pypi.python.org/simple/pip/: connection error: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by ProtocolError('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))) - skipping
PrasadK
  • 705
  • 4
  • 16
Harman
  • 1,020
  • 1
  • 9
  • 18
  • 1
    Firewall/proxy issues? Can you install directly via, for example, `pip install -f https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz`? – hoefling May 05 '18 at 10:30
  • 1
    Pypi is currently in process of migrating its backend to new codebase. It may be Pypi's issue. You may try opening issue at https://github.com/pypa/warehouse/issues, or just try again later – Andrii Maletskyi May 05 '18 at 13:18
  • @hoefling Thanks for your comment. But I think there's no firewall/proxy issue. But, even I observed the backend migration as suggested by Andriy Maletsky in one of the comments. One quick observation though, I think the way you suggest to install the package won't install the other dependencies required by that package. We may have to look for the required packages, install them and then install the desired package. I follow the similar approach when installing packages through the wheel. – Harman May 05 '18 at 14:37

0 Answers0