home-assistant
home-assistant copied to clipboard
Error install home-assistant
Hello , I can't install HASS ,after entering the command "pip install home assistant".I get the following error: subprocess-exited-with-error ~ $ # create a virtual environment (optional, but recommended) python -m venv hass source hass/bin/activate
pip install homeassistant Collecting homeassistant Using cached homeassistant-2022.9.2-py3-none-any.whl (19.3 MB) Collecting astral==2.2 Using cached astral-2.2-py2.py3-none-any.whl (30 kB) Collecting certifi>=2021.5.30 Using cached certifi-2022.6.15.1-py3-none-any.whl (160 kB) Collecting requests==2.28.1 Using cached requests-2.28.1-py3-none-any.whl (62 kB) Collecting voluptuous-serialize==2.5.0 Using cached voluptuous_serialize-2.5.0-py3-none-any.whl (6.8 kB) Collecting ciso8601==2.2.0 Using cached ciso8601-2.2.0.tar.gz (18 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting jinja2==3.1.2 Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB) Requirement already satisfied: pip<22.3,>=21.0 in ./hass/lib/python3.10/site-packages (from homeassistant) (22.2.2) Collecting ifaddr==0.1.7 Using cached ifaddr-0.1.7-py2.py3-none-any.whl (10 kB) Collecting voluptuous==0.13.1 Using cached voluptuous-0.13.1-py3-none-any.whl (29 kB) Collecting async-timeout==4.0.2 Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB) Collecting lru-dict==1.1.8 Using cached lru-dict-1.1.8.tar.gz (10 kB) Preparing metadata (setup.py) ... done Collecting attrs==21.2.0 Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB) Collecting yarl==1.7.2 Using cached yarl-1.7.2.tar.gz (168 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting bcrypt==3.1.7 Using cached bcrypt-3.1.7.tar.gz (42 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting PyJWT==2.4.0 Using cached PyJWT-2.4.0-py3-none-any.whl (18 kB) Collecting awesomeversion==22.8.0 Using cached awesomeversion-22.8.0-py3-none-any.whl (11 kB) Collecting httpx==0.23.0 Using cached httpx-0.23.0-py3-none-any.whl (84 kB) Collecting atomicwrites-homeassistant==1.4.1 Using cached atomicwrites_homeassistant-1.4.1-py2.py3-none-any.whl (7.1 kB) Collecting pyyaml==6.0 Using cached PyYAML-6.0.tar.gz (124 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting typing-extensions<5.0,>=3.10.0.2 Using cached typing_extensions-4.3.0-py3-none-any.whl (25 kB) Collecting cryptography==37.0.4 Using cached cryptography-37.0.4.tar.gz (585 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting python-slugify==4.0.1 Using cached python-slugify-4.0.1.tar.gz (11 kB) Preparing metadata (setup.py) ... done Collecting orjson==3.7.11 Using cached orjson-3.7.11.tar.gz (946 kB) Installing build dependencies ... error error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [58 lines of output] Collecting maturin<0.14,>=0.13 Using cached maturin-0.13.2.tar.gz (146 kB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting tomli>=1.1.0 Using cached tomli-2.0.1-py3-none-any.whl (12 kB) Building wheels for collected packages: maturin Building wheel for maturin (pyproject.toml): started Building wheel for maturin (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error
× Building wheel for maturin (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [34 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-cpython-310
creating build/lib.linux-armv7l-cpython-310/maturin
copying maturin/__init__.py -> build/lib.linux-armv7l-cpython-310/maturin
copying maturin/__main__.py -> build/lib.linux-armv7l-cpython-310/maturin
copying maturin/import_hook.py -> build/lib.linux-armv7l-cpython-310/maturin
running egg_info
creating maturin.egg-info
writing maturin.egg-info/PKG-INFO
writing dependency_links to maturin.egg-info/dependency_links.txt
writing requirements to maturin.egg-info/requires.txt
writing top-level names to maturin.egg-info/top_level.txt
writing manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'maturin.egg-info/SOURCES.txt'
running build_ext
running build_rust
error: rustup could not choose a version of rustc to run, because one wasn't specified explicitly, and no default is configured.
help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for maturin
Failed to build maturin
ERROR: Could not build wheels for maturin, which is required to install pyproject.toml-based projects
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip. (hass) ~ $
@Andrew2479 I have this error too. Did you solve it?
@Andrew2479 I have this error too. Did you solve it?
unfortunately no, after several attempts I always have the same error
I had something similar but i did not record exactly what fixed it. Try these commands pkg install binutils export RUSTFLAGS="-C lto=n" Try to install home-assistant again
I managed to install it.
There are 2 issues.
- The rust compiler is not installed
- current version of homeassistant is not compatible with Python 3.11 [https://github.com/home-assistant/core/issues/84117]
how to fix it, for now.
pkg upgrade
pkg install python nano make rust libcrypt libffi libjpeg-turbo binutils
python -m venv hass
source hass/bin/activate
pip install --upgrade pip
pip install wheel
pip install tzdata
pip install maturin
MATHLIB=m pip install numpy
MATHLIB=m pip install PyTurboJPEG==1.6.7
export RUSTFLAGS="-C lto=n"
export CARGO_BUILD_TARGET="$(rustc -Vv | grep "host" | awk '{print $2}')"
export CRYPTOGRAPHY_DONT_BUILD_RUST=1
pip install homeassistant==2022.12.0
@alexanderhale I've forked and changed/removed some of your wording to be device agnostic, feel free to re-use if you feel like going that way.