Fresh HA Core Installation on ARMv7

I have been trying to install Home Assistant Core on a computer board following this tutorial for the past few days, but I haven’t succeed after multiple failed attempts. I keep on running into this strange “failing building wheel for cryptography”. I didn’t have problem installing it on other platform before.

I noticed that other people have encountered this problem two years ago, but none of that suggestion solutions work for my case. I even tried installing without virtualenv, but I got some sort of coding error instead.

I am stuck now. Can anyone instruct me the right way to install Home Assistant on Libre Computer Tritium H3 running Armbian 22.08 Jammy?

the solution I found no longer is valid as the option to install without rust is no longer I have a raspberry pi in my RV that is stuck on a older version because I have yet found a path to update it that works

my home system is on a PC 386/64 system running debian 11 and it is on the latest I have built a tutorial step by step on that but that does not seem to apply to ARM

Finally, after more troubleshooting and researching, I am able to make much progress. It turns out I had four different problems.

First of all, my computer board only has 512 MB of memory. The compilation requires more than that; otherwise, it would just hang on building cryptography. To resolve this problem, I create a swap file following this tutorial.

By default, /tmp directory is created to have half of the system memory size. Without sufficient disk temporary space to work with, the cryptography build will fail complaining about LLVM ERROR: IO failure on output stream: No space left on device. To resolve this problem, I need to modify the /tmp directory size to 1GB by editing /etc/fstab

tmpfs /tmp tmpfs mode=1777,strictatime,nosuid,nodev,size=1G 0 0

The compilation of cryptography requires the correct version of Rust. Eventually, I dig around GitHub and found a correct command to install Rust:

sudo apt-get install rustc

Lastly, cryptography needs cargo installed. It can be installed with the following command:

sudo apt install cargo

Now I am running into Home Assistant initial setup issue, but that is another problem.

1 Like

Okay, got the initial Home Assistant setup issue resolved. It was missing two packages.

pip3 install sqlalchemy
pip3 install fnvhash
1 Like

ok at what step of the install do you need to insert your commands?

I am not sure which one you are referring to.

The installation of rustc and cargo must be done before this command:

sudo -u homeassistant -H -s

The same goes for editing /etc/fstab file and creating the swap file. Make sure to reboot the system for the changes to take effect.

The two missing packages should be entered before running Hass for the first time.

1 Like

Ok I will verify and update my install tutorial thanks

It seems Home Assistant is running rather slow on the computer board. I guess it needs more CPU speed to run it properly. Sigh!

Interesting have you loaded it with integrations or is the fresh install running slow?

Still does not load onto a Raspberry PI setup

copying src/cryptography/hazmat/backends/openssl/init.py → build/lib.linux-armv7l-cpython-310/cryptography/hazmat/backends/openssl
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file ‘src/cryptography.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘docs/_build’
warning: no previously-included files found matching ‘vectors’
warning: no previously-included files matching ‘’ found under directory ‘vectors’
warning: no previously-included files matching '
’ found under directory ‘.github’
warning: no previously-included files found matching ‘release.py’
warning: no previously-included files found matching ‘.readthedocs.yml’
warning: no previously-included files found matching ‘dev-requirements.txt’
warning: no previously-included files found matching ‘tox.ini’
warning: no previously-included files found matching ‘mypy.ini’
warning: no previously-included files matching ‘*’ found under directory ‘.circleci’
adding license file ‘LICENSE’
adding license file ‘LICENSE.APACHE’
adding license file ‘LICENSE.BSD’
adding license file ‘LICENSE.PSF’
writing manifest file ‘src/cryptography.egg-info/SOURCES.txt’
/tmp/pip-build-env-dk10j3ji/overlay/lib/python3.10/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing ‘cryptography.hazmat.bindings._rust’ as data is deprecated, please list it in packages.
!!

      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.

      'cryptography.hazmat.bindings._rust' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).

      Please make sure that 'cryptography.hazmat.bindings._rust' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).

      You can read more about "package discovery" and "data files" on setuptools
      documentation page.


  !!

    check.warn(importable)
  copying src/cryptography/py.typed -> build/lib.linux-armv7l-cpython-310/cryptography
  copying src/cryptography/hazmat/bindings/_openssl.pyi -> build/lib.linux-armv7l-cpython-310/cryptography/hazmat/bindings
  creating build/lib.linux-armv7l-cpython-310/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/__init__.pyi -> build/lib.linux-armv7l-cpython-310/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/asn1.pyi -> build/lib.linux-armv7l-cpython-310/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi -> build/lib.linux-armv7l-cpython-310/cryptography/hazmat/bindings/_rust
  copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.linux-armv7l-cpython-310/cryptography/hazmat/bindings/_rust
  running build_ext
  running build_rust
  cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/rust/Cargo.toml --release -v --features pyo3/extension-module pyo3/abi3-py36 -- --crate-type cdylib
      Updating crates.io index
  error: failed to get `asn1` as a dependency of package `cryptography-rust v0.1.0 (/tmp/pip-install-jkxa5x2w/cryptography_c0bc12fdc18f44cd9856c70bb12733a2/src/rust)`

  Caused by:
    failed to fetch `https://github.com/rust-lang/crates.io-index`

  Caused by:
    error inflating zlib stream; class=Zlib (5)

      =============================DEBUG ASSISTANCE=============================
      If you are seeing a compilation error please try the following steps to
      successfully install cryptography:
      1) Upgrade to the latest pip and try again. This will fix errors for most
         users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
      2) Read https://cryptography.io/en/latest/installation/ for specific
         instructions for your platform.
      3) Check our frequently asked questions for more information:
         https://cryptography.io/en/latest/faq/
      4) Ensure you have a recent Rust toolchain installed:
         https://cryptography.io/en/latest/installation/#rust

      Python: 3.10.9
      platform: Linux-5.15.76-v7l+-armv7l-with-glibc2.31
      pip: n/a
      setuptools: 65.6.3
      setuptools_rust: 1.5.2
      rustc: 1.48.0 (471d696c7 2020-12-10)
      =============================DEBUG ASSISTANCE=============================

  error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/rust/Cargo.toml --release -v --features 'pyo3/extension-module pyo3/abi3-py36' -- --crate-type cdylib` failed with code 101
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for cryptography
Building wheel for dbus-fast (pyproject.toml) … done
Created wheel for dbus-fast: filename=dbus_fast-1.82.0-cp310-cp310-manylinux_2_31_armv7l.whl size=4268348 sha256=003646271474bc2bda858692fec3b2ee9eb7b678f731b2f03269e65fa35fb04e
Stored in directory: /home/pi/.cache/pip/wheels/8f/74/77/c5a37451e2cbbf90be2ea0ee443f480d45b64f0c40236471e4
Successfully built dbus-fast
Failed to build cryptography
ERROR: Could not build wheels for cryptography, which is required to install pyproject.toml-based projects

second try

Building wheels for collected packages: cryptography
Building wheel for cryptography (PEP 517) … error
ERROR: Command errored out with exit status 1:
command: /srv/homeassistant/bin/python3 /tmp/tmpf78dhdw__in_process.py build_wheel /tmp/tmpzzt1fiec
cwd: /tmp/pip-install-idxlkke5/cryptography_1e48da7636234d9fb009056014af091e
Complete output (190 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-armv7l-cpython-39
creating build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/utils.py → build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/exceptions.py → build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/init.py → build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/fernet.py → build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/about.py → build/lib.linux-armv7l-cpython-39/cryptography
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat
copying src/cryptography/hazmat/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat
copying src/cryptography/hazmat/_oid.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat
creating build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/oid.py → build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/general_name.py → build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/name.py → build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/init.py → build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/certificate_transparency.py → build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/ocsp.py → build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/extensions.py → build/lib.linux-armv7l-cpython-39/cryptography/x509
copying src/cryptography/x509/base.py → build/lib.linux-armv7l-cpython-39/cryptography/x509
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends
copying src/cryptography/hazmat/backends/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hmac.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_serialization.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/padding.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_cipheralgorithm.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/cmac.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/hashes.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/_asymmetric.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/keywrap.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/constant_time.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
copying src/cryptography/hazmat/primitives/poly1305.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings
copying src/cryptography/hazmat/bindings/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hmac.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x25519.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x448.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ciphers.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/backend.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/utils.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dh.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/dsa.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/rsa.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/cmac.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/hashes.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/decode_asn1.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed448.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/x509.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ec.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/poly1305.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/ed25519.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
copying src/cryptography/hazmat/backends/openssl/aead.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/backends/openssl
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x25519.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/padding.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/x448.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/utils.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dh.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/dsa.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/rsa.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/types.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed448.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ec.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/asymmetric
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/hkdf.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/kbkdf.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/x963kdf.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/concatkdf.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
copying src/cryptography/hazmat/primitives/kdf/scrypt.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/kdf
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/totp.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/twofactor
copying src/cryptography/hazmat/primitives/twofactor/hotp.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/twofactor
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/algorithms.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/base.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/modes.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
copying src/cryptography/hazmat/primitives/ciphers/aead.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/ciphers
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs7.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/ssh.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/base.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
copying src/cryptography/hazmat/primitives/serialization/pkcs12.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/primitives/serialization
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/init.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/binding.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/openssl
copying src/cryptography/hazmat/bindings/openssl/_conditional.py → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/openssl
running egg_info
writing src/cryptography.egg-info/PKG-INFO
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing requirements to src/cryptography.egg-info/requires.txt
writing top-level names to src/cryptography.egg-info/top_level.txt
reading manifest file ‘src/cryptography.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
no previously-included directories found matching ‘docs/_build’
warning: no previously-included files found matching ‘vectors’
warning: no previously-included files matching ‘’ found under directory ‘vectors’
warning: no previously-included files matching '
’ found under directory ‘.github’
warning: no previously-included files found matching ‘release.py’
warning: no previously-included files found matching ‘.readthedocs.yml’
warning: no previously-included files found matching ‘dev-requirements.txt’
warning: no previously-included files found matching ‘tox.ini’
warning: no previously-included files found matching ‘mypy.ini’
warning: no previously-included files matching ‘*’ found under directory ‘.circleci’
adding license file ‘LICENSE’
adding license file ‘LICENSE.APACHE’
adding license file ‘LICENSE.BSD’
adding license file ‘LICENSE.PSF’
writing manifest file ‘src/cryptography.egg-info/SOURCES.txt’
/tmp/pip-build-env-78_s7j2i/overlay/lib/python3.9/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing ‘cryptography.hazmat.bindings._rust’ as data is deprecated, please list it in packages.
!!

  ############################
  # Package would be ignored #
  ############################
  Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
  but it is not listed in the `packages` configuration of setuptools.

  'cryptography.hazmat.bindings._rust' has been automatically added to the distribution only
  because it may contain data files, but this behavior is likely to change
  in future versions of setuptools (and therefore is considered deprecated).

  Please make sure that 'cryptography.hazmat.bindings._rust' is included as a package by using
  the `packages` configuration field or the proper discovery methods
  (for example by using `find_namespace_packages(...)`/`find_namespace:`
  instead of `find_packages(...)`/`find:`).

  You can read more about "package discovery" and "data files" on setuptools
  documentation page.

!!

check.warn(importable)

copying src/cryptography/py.typed → build/lib.linux-armv7l-cpython-39/cryptography
copying src/cryptography/hazmat/bindings/_openssl.pyi → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings
creating build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/init.pyi → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/asn1.pyi → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
copying src/cryptography/hazmat/bindings/_rust/x509.pyi → build/lib.linux-armv7l-cpython-39/cryptography/hazmat/bindings/_rust
running build_ext
generating cffi module ‘build/temp.linux-armv7l-cpython-39/cryptography.hazmat.bindings._openssl.c’
creating build/temp.linux-armv7l-cpython-39
running build_rust
cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/rust/Cargo.toml --release -v --features pyo3/abi3-py36 pyo3/extension-module – --crate-type cdylib
Updating crates.io index
error: failed to get asn1 as a dependency of package cryptography-rust v0.1.0 (/tmp/pip-install-idxlkke5/cryptography_1e48da7636234d9fb009056014af091e/src/rust)

Caused by:
failed to fetch https://github.com/rust-lang/crates.io-index

Caused by:
error inflating zlib stream; class=Zlib (5)

  =============================DEBUG ASSISTANCE=============================
  If you are seeing a compilation error please try the following steps to
  successfully install cryptography:
  1) Upgrade to the latest pip and try again. This will fix errors for most
     users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
  2) Read https://cryptography.io/en/latest/installation/ for specific
     instructions for your platform.
  3) Check our frequently asked questions for more information:
     https://cryptography.io/en/latest/faq/
  4) Ensure you have a recent Rust toolchain installed:
     https://cryptography.io/en/latest/installation/#rust

  Python: 3.9.2
  platform: Linux-5.15.76-v7l+-armv7l-with-glibc2.31
  pip: n/a
  setuptools: 65.6.3
  setuptools_rust: 1.5.2
  rustc: 1.48.0 (471d696c7 2020-12-10)
  =============================DEBUG ASSISTANCE=============================

error: cargo rustc --lib --message-format=json-render-diagnostics --manifest-path src/rust/Cargo.toml --release -v --features 'pyo3/abi3-py36 pyo3/extension-module' -- --crate-type cdylib failed with code 101

ERROR: Failed building wheel for cryptography
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

@trentjw I have been following your tutorials for installing core (I can’t use Docker on all my Pi’s because it messes up hostapd), and I have gotten one step further than this by first doing an altinstall of Python 3.10.9 (I can’t do a regular install, that messes up hostapd as well!), and then running this command for more dependencies as user pi, not in the virtual envionment (some of them were already in):

sudo apt-get install build-essential libssl-dev libffi-dev \
    python3-dev cargo

That came from this thread. So installation works, but onboarding doesn’t.

homeassistant) homeassistant@Mastiffmobilen:/srv/homeassistant $ hass
2023-01-24 09:36:59.174 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration mbapi2020 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-01-24 09:41:53.995 ERROR (MainThread) [homeassistant.setup] Setup failed for analytics: Unable to import component: No module named ‘_sqlite3’
2023-01-24 09:41:54.013 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of onboarding. Setup failed for dependencies: analytics
2023-01-24 09:41:54.014 ERROR (MainThread) [homeassistant.setup] Setup failed for onboarding: (DependencyError(…), ‘Could not setup dependencies: analytics’)
2023-01-24 09:41:54.016 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of frontend. Setup failed for dependencies: onboarding
2023-01-24 09:41:54.017 ERROR (MainThread) [homeassistant.setup] Setup failed for frontend: (DependencyError(…), ‘Could not setup dependencies: onboarding’)
2023-01-24 09:41:54.025 ERROR (MainThread) [homeassistant.setup] Setup failed for recorder: Unable to import component: No module named 'sqlite3’
2023-01-24 09:44:54.031 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 1 - moving forward
2023-01-24 09:44:54.229 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of logbook. Setup failed for dependencies: frontend, recorder
2023-01-24 09:44:54.230 ERROR (MainThread) [homeassistant.setup] Setup failed for logbook: (DependencyError(…), ‘Could not setup dependencies: frontend, recorder’)
2023-01-24 09:44:54.243 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of my. Setup failed for dependencies: frontend
2023-01-24 09:44:54.245 ERROR (MainThread) [homeassistant.setup] Setup failed for my: (DependencyError(…), ‘Could not setup dependencies: frontend’)
2023-01-24 09:44:54.255 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of history. Setup failed for dependencies: recorder
2023-01-24 09:44:54.270 ERROR (MainThread) [homeassistant.setup] Setup failed for history: (DependencyError(…), ‘Could not setup dependencies: recorder’)
2023-01-24 09:44:54.272 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of map. Setup failed for dependencies: frontend
2023-01-24 09:44:54.273 ERROR (MainThread) [homeassistant.setup] Setup failed for map: (DependencyError(…), ‘Could not setup dependencies: frontend’)
2023-01-24 09:44:54.755 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘Driftskontroll Hass’ failed to setup triggers and has been disabled: Integration ‘mqtt’ does not provide trigger support. Got OrderedDict([(‘id’, ‘153235832687889’), (‘alias’, ‘Driftskontroll Hass’), (‘trigger’, [OrderedDict([(‘platform’, ‘mqtt’), (‘topic’, ‘driftskontroll/hass_sjekk’)])]), (‘action’, [OrderedDict([(‘data’, {‘topic’: ‘driftskontroll/driftskontrollsvar’, ‘payload’: ‘Hass is alive’}), (‘service’, ‘mqtt.publish’)])]), (‘mode’, ‘single’), (‘max_exceeded’, ‘WARNING’), (‘trace’, {‘stored_traces’: 5}), (‘max’, 10)])
2023-01-24 09:44:54.816 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘JRMC Spiller’ failed to setup triggers and has been disabled: Integration ‘mqtt’ does not provide trigger support. Got OrderedDict([(‘id’, ‘1346293404623232235’), (‘alias’, ‘JRMC Spiller’), (‘description’, ‘Setter at JRMC spiller når anlegget slås av’), (‘condition’, []), (‘action’, [OrderedDict([(‘service’, ‘input_text.set_value’), (‘target’, OrderedDict([(‘entity_id’, [‘input_text.spillerjrmc’])])), (‘data’, {‘value’: ‘Ja’})])]), (‘trigger’, [OrderedDict([(‘platform’, ‘mqtt’), (‘topic’, ‘mastiffmobilen/JRMC spiller’)])]), (‘mode’, ‘single’), (‘max_exceeded’, ‘WARNING’), (‘trace’, {‘stored_traces’: 5}), ('ma…
2023-01-24 09:44:54.830 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘JRMC spiller ikke’ failed to setup triggers and has been disabled: Integration ‘mqtt’ does not provide trigger support. Got OrderedDict([(‘id’, ‘13462934462232235’), (‘alias’, ‘JRMC spiller ikke’), (‘description’, ‘Setter at JRMC ikke spiller når anlegget slås av’), (‘condition’, []), (‘action’, [OrderedDict([(‘service’, ‘input_text.set_value’), (‘target’, OrderedDict([(‘entity_id’, [‘input_text.spillerjrmc’])])), (‘data’, {‘value’: ‘Nei’})])]), (‘trigger’, [OrderedDict([(‘platform’, ‘mqtt’), (‘topic’, ‘mastiffmobilen/JRMC spiller ikke’)])]), (‘mode’, ‘single’), (‘max_exceeded’, ‘WARNING’), (‘trace’, {'stored_trac…
2023-01-24 09:44:54.843 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘JRMC sjekk’ failed to setup triggers and has been disabled: Integration ‘mqtt’ does not provide trigger support. Got OrderedDict([(‘id’, ‘123583268679889’), (‘alias’, ‘JRMC sjekk’), (‘action’, [OrderedDict([(‘service’, ‘mqtt.publish’), (‘data’, {‘topic’: ‘mastiffmobilen/JRMC spilte ved anlegg av’})])]), (‘trigger’, [OrderedDict([(‘platform’, ‘mqtt’), (‘topic’, ‘mastiffmobilen/Spilte JRMC ved anlegg av’)])]), (‘condition’, [OrderedDict([(‘condition’, ‘state’), (‘entity_id’, [‘input_text.spillerjrmc’]), (‘state’, ‘Ja’), (‘match’, ‘all’)])]), (‘mode’, ‘single’), (‘max_exceeded’, ‘WARNING’), (‘trace’, {'stored

2023-01-24 09:44:54.847 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: sun, zone, input_text, schedule, input_number, timer, input_boolean, input_datetime, counter, input_button, group, input_select, media_source, application_credentials, system_health, script
2023-01-24 09:44:54.852 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of energy. Setup failed for dependencies: history, recorder
2023-01-24 09:44:54.853 ERROR (MainThread) [homeassistant.setup] Setup failed for energy: (DependencyError(…), ‘Could not setup dependencies: history, recorder’)

So it seems like I need to add a module for sqlite in Python 3.10.9, I must try to find out how I do that.

Damn, I actually managed to do it! :woozy_face: :rofl: I installed a package (first line under), and then rebuilt Python 3.10.9 and made a new virtual environment. Here is my full Python 3.10.9 build (the -j 4 is nice, it makes the Pi use all cores, so the build takes a lot less time):

sudo apt install libsqlite3-dev
sudo apt install libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev libtk8.6 libgdm-dev libdb4o-cil-dev libpcap-dev
wget https://www.python.org/ftp/python/3.10.9/Python-3.10.9.tgz
tar -xf Python-3.10.*.tgz
cd Python-3.10.*/
./configure --enable-optimizations
make -j 4
sudo make altinstall
reboot

Then I did the steps from your tutorial, with one extra step for cargo (to make building cryptography work):

sudo apt-get install -y python3 python3-dev python3-venv python3-pip bluez libffi-dev libssl-dev libjpeg-dev zlib1g-dev autoconf build-essential libopenjp2-7 libtiff5 libturbojpeg0-dev tzdata libncurses5-dev libsqlite3-dev libreadline-dev libtk8.6 libgdm-dev libdb4o-cil-dev libpcap-dev

sudo apt-get install python3-dev cargo
sudo mkdir /srv/homeassistant
sudo useradd -rm homeassistant -G dialout,gpio,i2c
sudo chown homeassistant:homeassistant /srv/homeassistant
sudo -u homeassistant -H -s

Then, finally, as home assistant user:

cd /srv/homeassistant
version=3.10
python$version -m venv .
source bin/activate
python3 -m pip install wheel
pip install --upgrade pip
pip install sqlalchemy
pip install fnvhash
pip3 install homeassistant
hass

And that seems to have done the trick, the only error message I get now is that ZWaveJS is too old, which should be easy to remedy. I will now fix that with a new install of that. Then I’ll go back to the image I did before this, follow my own instructions and see if it works twice. In case it doesn’t I’ll of course keep an image backup of this working setup.

Second attempt gave the same result, so it seems like this is a working method, at least for me! :+1: :grin:

This is what I was able to get to work

I see. I didn’t really look at that one, because I don’t need touchscreen or kiosk. I just saw in your main tutorial post that the core regular installation for Rapsberry Pi didn’t yet work.

The kiosk doesn’t effect headless installation

Actually I’m not doing headless, I’m doing VNC and GUI. I just checked your thread Home Assistant Core install and upgrade instructions

And I saw Clean install HA Core on Raspberry pi OS (NOT WORKING YET)

So you have monitor mouse and keyboard board connected to the raspberry pi? The instructions should still work

No, VNC, as I said. I use that from my PC and work in the GUI on the Pi. I just meant that I thought you hadn’t managed to get it working yet since the main community guide thread says “not working yet”.