rgerganov / py-air-control

Command line app for controlling Philips air purifiers
MIT License
260 stars 52 forks source link

ModuleNotFoundError: 'Crypto' on Raspberry Pi Alpine linux #1

Closed aefo closed 5 years ago

aefo commented 5 years ago

I was getting the error below when running the script on my raspberry pi (in docker, with alpine base image).

Traceback (most recent call last):
  File "./airctrl.py", line 2, in <module>
    from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'

Following https://cryptography.io/en/latest/installation/#building-cryptography-on-linux and doing the below steps resolved it

apk add gcc musl-dev python3-dev libffi-dev openssl-dev
pip3 install --upgrade pycrypto

It may be helpful to add to the README.md some install steps.

(Otherwise the script worked great, thanks for sharing!)

rgerganov commented 5 years ago

Thanks for the bug report. I have packaged the application and uploaded it on PyPI. Now you can install with pip3 install py-air-control which will also install dependencies.