you can’t follow the link I shared 1:1. This was just an idea on how to work around. You would need to install Rust for HA user. Same for pip3 install cryptography
To do so, you need to activate Customize Python environment
as per our online docs. Home Automation Software Options - DietPi.com Docs
sudo -u homeassistant bash
. /home/homeassistant/pyenv-activate.sh
curl -sSfL 'https://sh.rustup.rs' -o rustup-init.sh
chmod +x rustup-init.sh
./rustup-init.sh -y --profile minimal
rm rustup-init.sh
source "$HOME/.cargo/env"
pip3 install cryptography