我在Ubuntu 20.04.1上未能重现你的问题:
# pip3 install -U git+https://github.com/home-assistant/core.git@refs/pull/38979/head
Collecting git+https://github.com/home-assistant/core.git@refs/pull/38979/head
Cloning https://github.com/home-assistant/core.git (to revision refs/pull/38979/head) to /tmp/pip-req-build-umhal3un
Running command git clone -q https://github.com/home-assistant/core.git /tmp/pip-req-build-umhal3un
WARNING: Did not find branch or tag 'refs/pull/38979/head', assuming revision or ref.
Running command git fetch -q https://github.com/home-assistant/core.git refs/pull/38979/head
Running command git checkout -q 754feb31f788d29c316c99a91f0db2124817e28f
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied, skipping upgrade: pytz>=2020.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2020.1)
Requirement already satisfied, skipping upgrade: ruamel.yaml==0.15.100 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (0.15.100)
Requirement already satisfied, skipping upgrade: requests==2.24.0 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2.24.0)
Collecting ciso8601==2.1.3
Using cached ciso8601-2.1.3.tar.gz (15 kB)
Collecting yarl==1.4.2
Using cached yarl-1.4.2-cp38-cp38-manylinux1_x86_64.whl (253 kB)
Collecting attrs==19.3.0
Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Requirement already satisfied, skipping upgrade: certifi>=2020.4.5.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2020.6.20)
Requirement already satisfied, skipping upgrade: pip>=8.0.3 in /usr/lib/python3/dist-packages (from homeassistant==0.115.0.dev0) (20.0.2)
Requirement already satisfied, skipping upgrade: bcrypt==3.1.7 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (3.1.7)
Requirement already satisfied, skipping upgrade: astral==1.10.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (1.10.1)
Collecting voluptuous-serialize==2.4.0
Using cached voluptuous_serialize-2.4.0-py3-none-any.whl (6.7 kB)
Requirement already satisfied, skipping upgrade: jinja2>=2.11.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2.11.2)
Requirement already satisfied, skipping upgrade: cryptography==2.9.2 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (2.9.2)
Requirement already satisfied, skipping upgrade: async-timeout==3.0.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (3.0.1)
Processing /root/.cache/pip/wheels/91/4d/4f/e740a68c215791688c46c4d6251770a570e8dfea91af1acb5c/python_slugify-4.0.1-py2.py3-none-any.whl
Collecting aiohttp==3.6.2
Using cached aiohttp-3.6.2-py3-none-any.whl (441 kB)
Requirement already satisfied, skipping upgrade: pyyaml==5.3.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (5.3.1)
Requirement already satisfied, skipping upgrade: voluptuous==0.11.7 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (0.11.7)
Requirement already satisfied, skipping upgrade: PyJWT==1.7.1 in /usr/local/lib/python3.8/dist-packages (from homeassistant==0.115.0.dev0) (1.7.1)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in /usr/local/lib/python3.8/dist-packages (from requests==2.24.0->homeassistant==0.115.0.dev0) (2.10)
Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in /usr/local/lib/python3.8/dist-packages (from requests==2.24.0->homeassistant==0.115.0.dev0) (3.0.4)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.8/dist-packages (from requests==2.24.0->homeassistant==0.115.0.dev0) (1.25.10)
Collecting multidict>=4.0
Using cached multidict-4.7.6-cp38-cp38-manylinux1_x86_64.whl (162 kB)
Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/local/lib/python3.8/dist-packages (from bcrypt==3.1.7->homeassistant==0.115.0.dev0) (1.15.0)
Requirement already satisfied, skipping upgrade: cffi>=1.1 in /usr/local/lib/python3.8/dist-packages (from bcrypt==3.1.7->homeassistant==0.115.0.dev0) (1.14.2)
Requirement already satisfied, skipping upgrade: MarkupSafe>=0.23 in /usr/local/lib/python3.8/dist-packages (from jinja2>=2.11.1->homeassistant==0.115.0.dev0) (1.1.1)
Collecting text-unidecode>=1.3
Using cached text_unidecode-1.3-py2.py3-none-any.whl (78 kB)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python3.8/dist-packages (from cffi>=1.1->bcrypt==3.1.7->homeassistant==0.115.0.dev0) (2.20)
Building wheels for collected packages: homeassistant, ciso8601
Building wheel for homeassistant (PEP 517) ... done
Created wheel for homeassistant: filename=homeassistant-0.115.0.dev0-py3-none-any.whl size=8876615 sha256=3f9294db120447a3ef6dc0af695656137e5918328d4d957cd3e8575689db39fa
Stored in directory: /tmp/pip-ephem-wheel-cache-l5we49k4/wheels/bb/92/2a/9a45a31372389f60ac920c5e8e4d2d25da11e1ec513ce0871d
Building wheel for ciso8601 (setup.py) ... done
Created wheel for ciso8601: filename=ciso8601-2.1.3-cp38-cp38-linux_x86_64.whl size=30187 sha256=dd22e1a257f4e903c48f1a7533125b226d43f2efe1333f8b03c292161ddba213
Stored in directory: /root/.cache/pip/wheels/55/c3/4c/7f1b3249545f80aa40b0ff3b4029e676e7521559fb9b5aab14
Successfully built homeassistant ciso8601
Installing collected packages: ciso8601, multidict, yarl, attrs, voluptuous-serialize, text-unidecode, python-slugify, aiohttp, homeassistant
Successfully installed aiohttp-3.6.2 attrs-19.3.0 ciso8601-2.1.3 homeassistant-0.115.0.dev0 multidict-4.7.6 python-slugify-4.0.1 text-unidecode-1.3 voluptuous-serialize-2.4.0 yarl-1.4.2
我能想到的几个可以修复的方法:
1. 升级pip版本:pip3 install -U pip
2. 卸载 uuid(这个包在现代的python中已经不再需要): pip3 uninstall uuid
3. 如果还不行手动删除你图中报错信息中的uuid.py。
另外,你的home assistant是直接在系统python环境里安装的还是使用venv?如果是venv的话你需要先执行 source venv文件夹/bin/activate 再执行其他pip操作。 |