51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1025|回复: 5
打印 上一主题 下一主题

Linux中安装tensorflow2.0出现如下问题

[复制链接]
  • TA的每日心情
    擦汗
    3 天前
  • 签到天数: 527 天

    连续签到: 4 天

    [LV.9]测试副司令

    跳转到指定楼层
    1#
    发表于 2020-12-1 13:48:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    1测试积点
    安装代码:sudo pip install tensorflow==2.0.0-beta0
    问题描述如下:
    1. ERROR: Exception:
    2. Traceback (most recent call last):
    3. File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/urllib3/response.py", line 425, in _error_catcher
    4.    yield
    5. File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/urllib3/response.py", line 507, in read
    6.    data = self._fp.read(amt) if not fp_closed else b""
    7. File "/usr/lib/python3.6/http/client.py", line 459, in read
    8.    n = self.readinto(b)
    9. File "/usr/lib/python3.6/http/client.py", line 503, in readinto
    10.    n = self.fp.readinto(b)
    11. File "/usr/lib/python3.6/socket.py", line 586, in readinto
    12.    return self._sock.recv_into(b)
    13. File "/usr/lib/python3.6/ssl.py", line 1012, in recv_into
    14.    return self.read(nbytes, buffer)
    15. File "/usr/lib/python3.6/ssl.py", line 874, in read
    16.    return self._sslobj.read(len, buffer)
    17. File "/usr/lib/python3.6/ssl.py", line 631, in read
    18.    v = self._sslobj.read(len, buffer)
    19. socket.timeout: The read operation timed out

    20. During handling of the above exception, another exception occurred:

    21. Traceback (most recent call last):
    22. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/base_command.py", line 188, in _main
    23.    status = self.run(options, args)
    24. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
    25.    return func(self, options, args)
    26. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/commands/install.py", line 333, in run
    27.    reqs, check_supported_wheels=not options.target_dir
    28. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/resolution/legacy/resolver.py", line 179, in resolve
    29.    discovered_reqs.extend(self._resolve_one(requirement_set, req))
    30. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/resolution/legacy/resolver.py", line 362, in _resolve_one
    31.    abstract_dist = self._get_abstract_dist_for(req_to_install)
    32. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/resolution/legacy/resolver.py", line 314, in _get_abstract_dist_for
    33.    abstract_dist = self.preparer.prepare_linked_requirement(req)
    34. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/operations/prepare.py", line 469, in prepare_linked_requirement
    35.    hashes=hashes,
    36. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/operations/prepare.py", line 259, in unpack_url
    37.    hashes=hashes,
    38. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/operations/prepare.py", line 130, in get_http_url
    39.    link, downloader, temp_dir.path, hashes
    40. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/operations/prepare.py", line 281, in _download_http_url
    41.    for chunk in download.chunks:
    42. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/progress_bars.py", line 166, in iter
    43.    for x in it:
    44. File "/usr/local/lib/python3.6/dist-packages/pip/_internal/network/utils.py", line 39, in response_chunks
    45.    decode_content=False,
    46. File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/urllib3/response.py", line 564, in stream
    47.    data = self.read(amt=amt, decode_content=decode_content)
    48. File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/urllib3/response.py", line 529, in read
    49.    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
    50. File "/usr/lib/python3.6/contextlib.py", line 99, in __exit__
    51.    self.gen.throw(type, value, traceback)
    52. File "/usr/local/lib/python3.6/dist-packages/pip/_vendor/urllib3/response.py", line 430, in _error_catcher
    53.    raise ReadTimeoutError(self._pool, None, "Read timed out.")
    54. pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
    复制代码
    求解决方法

    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

  • TA的每日心情
    擦汗
    2024-9-30 15:02
  • 签到天数: 751 天

    连续签到: 2 天

    [LV.10]测试总司令

    2#
    发表于 2020-12-2 10:29:50 | 只看该作者
    切换一下pip源
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    3 天前
  • 签到天数: 1516 天

    连续签到: 5 天

    [LV.Master]测试大本营

    3#
    发表于 2020-12-2 10:41:17 | 只看该作者
    超时了,检查下网络
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    3 天前
  • 签到天数: 1801 天

    连续签到: 5 天

    [LV.Master]测试大本营

    4#
    发表于 2020-12-2 11:57:48 | 只看该作者
    在命令后面加上-i参数:
    sudo pip install tensorflow==2.0.0-beta0 -i https://pypi.tuna.tsinghua.edu.cn/simple
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    3 天前
  • 签到天数: 2812 天

    连续签到: 5 天

    [LV.Master]测试大本营

    5#
    发表于 2020-12-2 13:19:07 | 只看该作者
    试试楼上的方法
    回复

    使用道具 举报

  • TA的每日心情
    奋斗
    2024-10-22 14:23
  • 签到天数: 1007 天

    连续签到: 1 天

    [LV.10]测试总司令

    6#
    发表于 2020-12-2 13:32:43 | 只看该作者
    更换一下pip源,换成国内的清华源或者豆瓣试试
    回复

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-18 07:34 , Processed in 0.068606 second(s), 21 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表