ikalchev/HAP-python

installation hanging

Pythonaire opened this issue · 3 comments

Try to install on a clean system, but it hangs with" Building wheel for cryptography (pyproject.toml) ... /" and CPU = 100%
Following the instructions to update pip didn't help. Renew the system again, the install routine claims it need rust ..
python version is 3.9

Same problem, even after installing Rust..

I'm getting the same issue. I installed cryptography manually to install the twilio library and that worked fine (initially, the twilio install threw the same cryptography error, now it doesn't). In fact, when installing Hap-python[QRCode], just like 16 lines above "Collecting cryptography", which causes the error, it says "Requirement already satisfied: cryptography in /usr/lib/python3/dist-packages (from HAP-python[QRCode]) (3.3.2)".
I don't understand why it's trying to install it again if the requirement is already satisfied.
And I do not want to manually build using rust.

One weird thing I noticed, in the details of the error it says "n/a" for pip. My pip version is:
pip 22.3.1 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)

System Info from error:
Python: 3.9.2
platform: Linux-5.15.76-v7+-armv7l-with-glibc2.31
pip: n/a
setuptools: 65.6.3
setuptools_rust: 1.5.2
rustc: n/a

EDIT:
Disclaimer: I don't know 100% of what I'm talking about, so take it with a grain of salt.
I noticed that this issue is caused by "piwheels". The link below shows that the build for 38.0.3 failed. I think this means there is no precompiled "wheel"(?) we can use to install. I manually installed 38.0.1 with pip install cryptography==38.0.1 and HAP-python was able to install successfully. I'm assuming HAP-python must have a requirement for cryptography to be greater than 3.4.6 even though the requirements.txt doesn't specify a version.
https://www.piwheels.org/project/cryptography/

Try to install on a clean system, but it hangs with" Building wheel for cryptography (pyproject.toml) ... /" and CPU = 100%
Following the instructions to update pip didn't help. Renew the system again, the install routine claims it need rust ..
python version is 3.9

reinstall older version works for me: pip install pip3 install --upgrade HAP-python[QRCode]==4.4