Piwheel issues with older versions of Raspbian/Hassbian
If you are using Hass.io, Docker or a distro based on Debian Buster this does not apply to you.
After upgrading to Home Assistant version 0.96.0, some users started seeing errors like this:
ImportError: /usr/lib/arm-linux-gnueabihf/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by /srv/homeassistant/lib/python3.7/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so
And all integrations that communicated with SSL (https) stopped working.
This applies if you have one of these installations with a manual installation or with Hassbian:
- Raspbian Jessie
- Raspbian Stretch
The reason for this, is the way piwheels determines the OS version you have by looking at the Python version that is in use.
@frenck
There are two potential solutions for this issue, where option 1 are considered the best of them.
Option 1
Upgrade your distribution to Debian Buster.
NB!: This option will upgrade your entire system and might negatively affect other things you might have running.
Before you continue with this, you should make sure that you have a recent backup of your system.
Steps
- Change
stretch
orjessie
tobuster
in these files:/etc/apt/sources.list
/etc/apt/sources.list.d/raspi.list
/etc/apt/sources.list.d/hassbian.list
- Run
sudo apt-get update
- Run
sudo apt-get -y dist-upgrade
- Run
sudo reboot
Option 2
Disable piwheels prebuilt packages.
This option is a faster method initially, but it has the huge drawback of having to compile the packages locally. You should only use this option if you run other things on your system that will not work if you use the first option.
Steps
-
edit
/etc/pip.conf
and comment out the line containing piwheels, like this:[global] # extra-index-url=https://www.piwheels.org/simple
-
Run
source /srv/homeassistant/bin/activate
-
Run
pip uninstall cryptography
-
Run
pip install --no-cache cryptography==2.7
-
Run
deactivate