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

 找回密码
 立即注册
查看: 1612|回复: 5

[已解决] python部署homeassistant的pip版本问题

[复制链接]

22

主题

143

帖子

1678

积分

金牌会员

Rank: 6Rank: 6

积分
1678
金钱
1535
HASS币
0
发表于 2021-10-20 16:49:54 | 显示全部楼层 |阅读模式
本帖最后由 qiaofei828 于 2021-10-21 10:37 编辑

纯纯新手一个
windows系统下安装python3.10
安装homeassistant是老是自动卸载pip,然后报错,先是提示我现在版本是20..2.4让我升级20.3,我直接升级到了21.3。还是不行,然后手动安装20.3。继续安装错误代码如下,求大神指导

Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.3
    Uninstalling pip-20.3:
      Successfully uninstalled pip-20.3
  Rolling back uninstall of pip
  Moving to c:\users\jorfei\appdata\roaming\python\python310\scripts\pip.exe
   from C:\Users\Jorfei\AppData\Local\Temp\pip-uninstall-f5_9ntfy\pip.exe
  Moving to c:\users\jorfei\appdata\roaming\python\python310\scripts\pip3.10.exe
   from C:\Users\Jorfei\AppData\Local\Temp\pip-uninstall-f5_9ntfy\pip3.10.exe
  Moving to c:\users\jorfei\appdata\roaming\python\python310\scripts\pip3.exe
   from C:\Users\Jorfei\AppData\Local\Temp\pip-uninstall-f5_9ntfy\pip3.exe
  Moving to c:\users\jorfei\appdata\roaming\python\python310\site-packages\pip-20.3.dist-info\
   from C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\~ip-20.3.dist-info
  Moving to c:\users\jorfei\appdata\roaming\python\python310\site-packages\pip\
   from C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\~ip
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_internal\cli\base_command.py", line 210, in _main
    status = self.run(options, args)
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_internal\cli\req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_internal\commands\install.py", line 392, in run
    installed = install_given_reqs(
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_internal\req\__init__.py", line 82, in install_given_reqs
    requirement.install(
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_internal\req\req_install.py", line 816, in install
    install_wheel(
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_internal\operations\install\wheel.py", line 837, in install_wheel
    _install_wheel(
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_internal\operations\install\wheel.py", line 747, in _install_wheel
    generated_console_scripts = maker.make_multiple(scripts_to_generate)
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 418, in make_multiple
    filenames.extend(self.make(specification, options))
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_internal\operations\install\wheel.py", line 483, in make
    return super(PipScriptMaker, self).make(specification, options)
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 407, in make
    self._make_script(entry, filenames, options=options)
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 307, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 242, in _write_script
    launcher = self._get_launcher('t')
  File "C:\Users\Jorfei\AppData\Roaming\Python\Python310\site-packages\pip\_vendor\distlib\scripts.py", line 386, in _get_launcher
    raise ValueError(msg)
ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
WARNING: You are using pip version 20.3; however, version 21.3 is available.
You should consider upgrading via the 'c:\users\jorfei\appdata\local\programs\python\python310\python.exe -m pip install --upgrade pip' command.

回复

使用道具 举报

22

主题

143

帖子

1678

积分

金牌会员

Rank: 6Rank: 6

积分
1678
金钱
1535
HASS币
0
 楼主| 发表于 2021-10-20 17:14:40 | 显示全部楼层
刚才使用命令让homeassistant来安装pip,安装成功。
再输入安装homeassistant命令代码如下
PS C:\Users\Jorfei> pip3 install homeassistant
Requirement already satisfied: homeassistant in c:\users\jorfei\appdata\roaming\python\python310\site-packages (2021.10.6)
Requirement already satisfied: python-slugify==4.0.1 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (4.0.1)
Requirement already satisfied: httpx==0.19.0 in c:\users\jorfei\appdata\roaming\python\python310\site-packages (from homeassistant) (0.19.0)
Requirement already satisfied: aiohttp==3.7.4.post0 in c:\users\jorfei\appdata\roaming\python\python310\site-packages (from homeassistant) (3.7.4.post0)
Requirement already satisfied: certifi>=2021.5.30 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (2021.10.8)
Requirement already satisfied: attrs==21.2.0 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (21.2.0)
Requirement already satisfied: astral==2.2 in c:\users\jorfei\appdata\roaming\python\python310\site-packages (from homeassistant) (2.2)
Requirement already satisfied: requests==2.26.0 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (2.26.0)
Requirement already satisfied: voluptuous-serialize==2.4.0 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (2.4.0)
Requirement already satisfied: jinja2==3.0.1 in c:\users\jorfei\appdata\roaming\python\python310\site-packages (from homeassistant) (3.0.1)
Requirement already satisfied: PyJWT==2.1.0 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (2.1.0)
Requirement already satisfied: voluptuous==0.12.2 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (0.12.2)
Requirement already satisfied: yarl==1.6.3 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (1.6.3)
Requirement already satisfied: awesomeversion==21.8.1 in c:\users\jorfei\appdata\roaming\python\python310\site-packages (from homeassistant) (21.8.1)
Requirement already satisfied: cryptography==3.4.8 in c:\users\jorfei\appdata\roaming\python\python310\site-packages (from homeassistant) (3.4.8)
Requirement already satisfied: ciso8601==2.2.0 in c:\users\jorfei\appdata\roaming\python\python310\site-packages (from homeassistant) (2.2.0)
Requirement already satisfied: bcrypt==3.1.7 in c:\users\jorfei\appdata\roaming\python\python310\site-packages (from homeassistant) (3.1.7)
Requirement already satisfied: pyyaml==5.4.1 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (5.4.1)
Requirement already satisfied: pip<20.3,>=8.0.3 in c:\users\jorfei\appdata\roaming\python\python310\site-packages (from homeassistant) (20.2.4)
Requirement already satisfied: async-timeout==3.0.1 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from homeassistant) (3.0.1)
Requirement already satisfied: text-unidecode>=1.3 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from python-slugify==4.0.1->homeassistant) (1.3)
Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from httpx==0.19.0->homeassistant) (1.5.0)
Requirement already satisfied: httpcore<0.14.0,>=0.13.3 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from httpx==0.19.0->homeassistant) (0.13.7)
Requirement already satisfied: charset-normalizer in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from httpx==0.19.0->homeassistant) (2.0.7)
Requirement already satisfied: sniffio in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from httpx==0.19.0->homeassistant) (1.2.0)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from aiohttp==3.7.4.post0->homeassistant) (5.2.0)
Requirement already satisfied: chardet<5.0,>=2.0 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from aiohttp==3.7.4.post0->homeassistant) (4.0.0)
Requirement already satisfied: typing-extensions>=3.6.5 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from aiohttp==3.7.4.post0->homeassistant) (3.10.0.2)
Requirement already satisfied: pytz in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from astral==2.2->homeassistant) (2021.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from requests==2.26.0->homeassistant) (1.26.7)
Requirement already satisfied: idna<4,>=2.5; python_version >= "3" in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from requests==2.26.0->homeassistant) (3.3)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from jinja2==3.0.1->homeassistant) (2.0.1)
Requirement already satisfied: cffi>=1.12 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from cryptography==3.4.8->homeassistant) (1.15.0)
Requirement already satisfied: six>=1.4.1 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from bcrypt==3.1.7->homeassistant) (1.16.0)
Requirement already satisfied: anyio==3.* in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from httpcore<0.14.0,>=0.13.3->httpx==0.19.0->homeassistant) (3.3.4)
Requirement already satisfied: h11<0.13,>=0.11 in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from httpcore<0.14.0,>=0.13.3->httpx==0.19.0->homeassistant) (0.12.0)
Requirement already satisfied: pycparser in c:\users\jorfei\appdata\local\programs\python\python310\lib\site-packages (from cffi>=1.12->cryptography==3.4.8->homeassistant) (2.20)
WARNING: You are using pip version 20.2.4; however, version 21.3 is available.
You should consider upgrading via the 'c:\users\jorfei\appdata\local\programs\python\python310\python.exe -m pip install --upgrade pip' command.
但是输入hass提示无法识别,怎么回事呢
回复

使用道具 举报

6

主题

743

帖子

5958

积分

论坛元老

Rank: 8Rank: 8

积分
5958
金钱
5210
HASS币
20
发表于 2021-10-21 13:51:26 | 显示全部楼层
Python版本太低,建议安装Python3.9.7。
回复

使用道具 举报

2

主题

32

帖子

124

积分

注册会员

Rank: 2

积分
124
金钱
91
HASS币
0
发表于 2022-4-21 13:42:53 | 显示全部楼层
你怎么解决的?升级到3.9.7?
回复

使用道具 举报

2

主题

32

帖子

124

积分

注册会员

Rank: 2

积分
124
金钱
91
HASS币
0
发表于 2022-4-21 13:44:18 | 显示全部楼层
qiaofei828 发表于 2021-10-20 17:14
刚才使用命令让homeassistant来安装pip,安装成功。
再输入安装homeassistant命令代码如下
PS C:%users\Jor ...

我也是一模一样的错误,能分享下解决方法吗?
回复

使用道具 举报

22

主题

143

帖子

1678

积分

金牌会员

Rank: 6Rank: 6

积分
1678
金钱
1535
HASS币
0
 楼主| 发表于 2022-4-21 16:28:45 | 显示全部楼层
haley 发表于 2022-4-21 13:44
我也是一模一样的错误,能分享下解决方法吗?

没弄好,后来用的X86小主机装虚拟机
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-26 02:33 , Processed in 0.201218 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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