Troubleshooting
If you are using Linux, then you should upgrade pip (in a virtual environment!) and attempt to install cryptography again before trying to install the Rust toolchain. On most Linux distributions, the latest version of pip will be able to install a binary wheel, so you won’t need a Rust toolchain.
Building cryptography requires having a working Rust toolchain. The current minimum supported Rust version is 1.48.0. This is newer than the Rust some package managers ship, so users may need to install with the instructions below.
https://cryptography.io/en/latest/installation/#rustThese are some of the problems I faced while runing/installing. This is an error collection I got from different HA installs, you can find some or hopefully none of them.
Core installations without manylinux/osx/windows wheel PEP support need to install rust to compile cryptography.
https://github.com/home-assistant/core/pull/56481
(Musl wheel support is ready after the new auditwheel version is out)
# (in a virtual environment!)
pip install cryptography
https://cryptography.io/en/latest/installation/https://cryptography.io/en/latest/installation/#rusthttps://cryptography.io/en/latest/changelog/Building cryptography requires having a working Rust toolchain.https://cryptography.io/en/latest/installation/#rustinstall Rust
curl https://sh.rustup.rs -sSf | sh
output
rust version 1.66.1
https://www.rust-lang.org/learn/get-startedhttps://www.rust-lang.org/tools/installsudo apt -y install rustcIn the Rust development environment, all tools are installed to the ~/.cargo/bin directory, and this is where you will find the Rust toolchain, including
rustc, cargo, and rustup.
pip3 install pyOpenSSL --upgradeoutput
Building wheels for collected packages: cryptography
Building wheel for cryptography (pyproject.toml) ... done
Created wheel for cryptography: filename=cryptography-38.0.3-cp39-cp39-linux_armv7l.whl size=2464070 sha256=e73ccca55cbfcb3f2c81cd72f686463bce7cb4586b8394e0840011b23af41446
Stored in directory: /home/homeassistant20221102/.cache/pip/wheels/e4/a1/02/3831079a3ada1d9228eea10f236572650144f7c8e99f9c6dac
Successfully built cryptography
Installing collected packages: pycparser, cffi, cryptography, pyOpenSSL
Successfully installed cffi-1.15.1 cryptography-38.0.3 pyOpenSSL-22.1.0 pycparser-2.21
Installing collected packages: pyOpenSSL
Attempting uninstall: pyOpenSSL
Found existing installation: pyOpenSSL 20.0.1
Uninstalling pyOpenSSL-20.0.1:
Successfully uninstalled pyOpenSSL-20.0.1
Successfully installed pyOpenSSL-22.1.0