首页 文章

当我尝试安装tensorflow时遇到了错误

提问于
浏览
-1

操作系统:Ubuntu 16.04 . python版本是2.7.12 . 点数版本是9.0.1 . 当我打字

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

正如指南所说,但是我得到以下输出[![在此处输入图像描述] [1]] [1]并且我对错误知之甚少,因为我尝试ping“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

1 回答

  • 0

    非常感谢帮助我的人 . 我通过使用来解决这个问题

    sudo pip install tensorflow

    而不是使用网络地址 . 幸运的是,它的工作原理 .

相关问题