『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 1970|回复: 1

[求助] pip安装问题求助

[复制链接]

1

主题

11

帖子

50

积分

注册会员

Rank: 2

积分
50
金钱
39
HASS币
0
发表于 2020-11-11 19:15:19 | 显示全部楼层 |阅读模式
环境:vmware workstation 12,
系统:centos8.2-mini
安装hass参考文档:https://bbs.hassbian.com/thread-8734-1-1.html
现安装至第4部.
python版本如下:
[root@localhost srv]# python3 -V
Python 3.8.1

第5部防火墙以百度命令整个关闭。
第六步安装hass开始无解。。。
报错如下:
WARNING: You are using pip version 19.2.3, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

百度该问题:
https://blog.csdn.net/qq_41575507/article/details/104555139
按照pip安装报错,解决无效。。。
附一:
[root@localhost ~]# pip3 install --index-url https://pypi.douban.com/simple scipy
Looking in indexes: https://pypi.douban.com/simple
Collecting scipy
  Downloading https://pypi.doubanio.com/packag ... nylinux1_x86_64.whl (25.8MB)
     |████████████████████████████████| 25.8MB 101kB/s
Collecting numpy>=1.14.5 (from scipy)
  Downloading https://pypi.doubanio.com/packag ... inux2010_x86_64.whl (14.5MB)
     |████████████████████████████████| 14.5MB 105kB/s
Installing collected packages: numpy, scipy
Successfully installed numpy-1.19.4 scipy-1.5.4
WARNING: You are using pip version 19.2.3, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@localhost ~]# pip3 install --index-url https://mirrors.aliyun.com/pypi/simple scipy
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Requirement already satisfied: scipy in /usr/local/python3/lib/python3.8/site-packages (1.5.4)
Requirement already satisfied: numpy>=1.14.5 in /usr/local/python3/lib/python3.8/site-packages (from scipy) (1.19.4)
WARNING: You are using pip version 19.2.3, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

附二:
[root@localhost ~]# pip3  install  --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/p ... y2.py3-none-any.whl (1.5MB)
     |█████▎                          | 245kB 3.3kB/s eta 0:06:17ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 397, in _error_catcher
    yield
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 479, in read
    data = self._fp.read(amt)
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
    data = self.__fp.read(amt)
  File "/usr/local/python3/lib/python3.8/http/client.py", line 454, in read
    n = self.readinto(b)
  File "/usr/local/python3/lib/python3.8/http/client.py", line 498, in readinto
    n = self.fp.readinto(b)
  File "/usr/local/python3/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/usr/local/python3/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/local/python3/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in main
    status = self.run(options, args)
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 345, in run
    resolver.resolve(requirement_set)
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 196, in resolve
    self._resolve_one(requirement_set, req)
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 359, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/legacy_resolve.py", line 305, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 195, in prepare_linked_requirement
    unpack_url(
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/download.py", line 1058, in unpack_url
    unpack_http_url(
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/download.py", line 920, in unpack_http_url
    from_path, content_type = _download_http_url(link,
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/download.py", line 1152, in _download_http_url
    _download_url(resp, link, content_file, hashes, progress_bar)
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/download.py", line 861, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/utils/hashes.py", line 75, in check_against_chunks
    for chunk in chunks:
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/download.py", line 829, in written_chunks
    for chunk in chunks:
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/utils/ui.py", line 156, in iter
    for x in it:
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_internal/download.py", line 794, in resp_read
    for chunk in resp.raw.stream(
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 531, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 496, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/usr/local/python3/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/python3/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 402, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
WARNING: You are using pip version 19.2.3, however version 20.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


回复

使用道具 举报

6

主题

743

帖子

5956

积分

论坛元老

Rank: 8Rank: 8

积分
5956
金钱
5208
HASS币
20
发表于 2020-11-12 08:32:59 | 显示全部楼层
换国内源试试。。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-25 05:28 , Processed in 0.183116 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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