-1
操作系統:Ubuntu 16.04。 python版本是2.7.12。 pip版本是9.0.1。 當我鍵入當我嘗試安裝tensorflow時遇到錯誤
PIP安裝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',))
如果您複製粘貼錯誤而不是提供屏幕截圖,它對我們來說更有用。安裝tensorflow的舊版本的原因是什麼? –
只需在瀏覽器中輸入url或嘗試「wget https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl」即可使用。聞起來像一個連接問題(你也可以從網絡中得到的是無法到達的錯誤) –
'超過最大值reties' ...你試了一堆,現在該網站阻止訪問。試試明天 –