当我尝试安装tensorflow时,我遇到了一个

2024-04-25 14:47:50 发布

您现在位置:Python中文网/ 问答频道 /正文

操作系统:Ubuntu 16.04。 python版本是2.7.12。 pip版本是9.0.1。 当我打字时

pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

正如指南所述,但是我得到了以下输出 [![在此处输入图像说明][1]][1] 我对这个错误不太了解,因为我试着storage.googleapis.com存储,我发现我可以接收响应数据。希望有人能帮我。非常感谢!在

编辑:添加错误消息。在

Collecting tensorflow==0.5.0 from https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe5752fd710>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe57420a750>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe57420a850>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe57420ae90>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe57420a190>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
Exception:
Traceback (most recent call last):
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/commands/install.py", line 335, in run
    wb.build(autobuilding=True)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/req/req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/download.py", line 821, in unpack_url
    hashes=hashes
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/download.py", line 659, in unpack_http_url
    hashes)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/download.py", line 853, in _download_http_url
    stream=True,
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 488, in get
    return self.request('GET', url, **kwargs)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/download.py", line 386, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/home/lwj/.local/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py", line 487, in send
    raise ConnectionError(e, request=request)
ConnectionError: HTTPSConnectionPool(host='storage.googleapis.com', port=443): Max retries exceeded with url: /tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl (Caused by NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fe57420af50>: Failed to establish a new connection: [Errno 101] Network is unreachable',))

[1]: https://i.stack.imgur.com/FSLml.png


Tags: pipinpynonehomelinuxlibpackages

热门问题