所有软件包的pip安装都失败了

时间:2018-05-05 09:48:37

标签: python pip pypi

我无法使用pip安装任何python包。几天前,所有东西都完美无缺。但是现在我在安装时遇到以下错误。我认为问题是因为pip用于获取wheel包的URL。现在我通过手动下载包轮安装所有这些包,但这是非常麻烦的任务。

Python版本:3.5.2,操作系统:Ubuntu 16.04

命令:pip -v install pandas

记录:

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

0 个答案:

没有答案