ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
在linux机器上安装TensorFlow时,报错Downloading https://files.pythonhosted.org/packages/fa/53/685b9d68e5734cf8e2d13b2d4d29e6cede94714b665019a5627a623b3e21/grpcio-1.13.0-cp27-cp27mu-manylinux1_x86_64.whl (9....
·
在linux机器上安装TensorFlow时,报错
Downloading https://files.pythonhosted.org/packages/fa/53/685b9d68e5734cf8e2d13b2d4d29e6cede94714b665019a5627a623b3e21/grpcio-1.13.0-cp27-cp27mu-manylinux1_x86_64.whl (9.0MB)
28% |█████████▎ | 2.6MB 6.4kB/s eta 0:16:40Exception:
Traceback (most recent call last):
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 141, in main
status = self.run(options, args)
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 299, in run
resolver.resolve(requirement_set)
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/resolve.py", line 102, in resolve
self._resolve_one(requirement_set, req)
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 283, in prepare_linked_requirement
progress_bar=self.progress_bar
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/download.py", line 836, in unpack_url
progress_bar=progress_bar
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/download.py", line 673, in unpack_http_url
progress_bar)
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/download.py", line 897, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/download.py", line 617, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/utils/hashes.py", line 48, in check_against_chunks
for chunk in chunks:
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/download.py", line 585, in written_chunks
for chunk in chunks:
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/utils/ui.py", line 159, in iter
for x in it:
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_internal/download.py", line 574, in resp_read
decode_content=False):
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 465, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 430, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "/home/appadmin/anaconda2/lib/python2.7/contextlib.py", line 35, in __exit__
self.gen.throw(type, value, traceback)
File "/home/appadmin/anaconda2/lib/python2.7/site-packages/pip/_vendor/urllib3/response.py", line 336, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
网上搜了几种方法,只有这种方法有效,特此记录
[appadmin@hx-estest ~]$ pip --trusted-host pypi.python.org --trusted-host pypi.org install --trusted-host files.pythonhosted.org tensorflow
更多推荐
已为社区贡献1条内容
所有评论(0)