Cannot reinstall HomeAssistant with pyenv Python


When I tried to make a backup script for Home Assistant made a mistake and lost some files (Python and HomeAssistnat related) :roll_eyes: β†’ Home Assistant don’t work anymore.

When I try to reinstall Home Assistant with dietpi-software reinstall 157 then I got an error: The Python ssl extension was not compiled. Missing the OpenSSL lib? So Python could not be installed

At this moment the openssl version is 1.1.1
openssl version
OpenSSL 1.1.1g 21 Apr 2020
I think that the install is suposing a lower version?

Below is the log of the reinstall. What can I do to recover Python and Home Assist?

#### Details:
- Date           | Fri Jun  4 13:07:57 CEST 2021
- DietPi version | v7.2.3 (MichaIng/master)
- Image creator  | DietPi Core Team
- Pre-image      | Raspbian Lite
- Hardware       | RPi 2 Model B (armv7l) (ID=2)
- Kernel version | Linux VanDerMedPlay 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux
- Distro         | stretch (ID=4,RASPBIAN=1)
- Command        | sudo -u homeassistant dash -c
. /home/homeassistant/
pyenv install 3.8.10
pyenv local 3.8.10
pip3 install -U pip wheel
[ -z '' ] || pip3 install
exec pip3 install homeassistant
- Exit code      | 127
- Software title | DietPi-Software

Downloading Python-3.8.10.tar.xz…
Installing Python-3.8.10…
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.

BUILD FAILED (Raspbian GNU/Linux 9 using python-build 20180424)

Inspect or clean up the working tree at /tmp/python-build.20210604125011.7473
Results logged to /tmp/python-build.20210604125011.7473.log

Last 10 log lines:
./python -E -m ensurepip
$ensurepip --root=/ ;
Looking in links: /tmp/tmptuh0woss
Processing /tmp/tmptuh0woss/setuptools-56.0.0-py3-none-any.whl
Processing /tmp/tmptuh0woss/pip-21.1.1-py3-none-any.whl
Installing collected packages: setuptools, pip
WARNING: The scripts pip3 and pip3.8 are installed in β€˜/home/homeassistant/.pyenv/versions/3.8.10/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-21.1.1 setuptools-56.0.0
pyenv: version `3.8.10’ not installed
dash: 5: pip3: not found
dash: 7: exec: pip3: not found


I see you are running old Debian Stretch. Would it be an option to update to Debian Buster? Or do you like to stay on Stretch? Because Stretch is a death end road and will become oldold soon, once Bullseye has been released.

Hi, I really like to upgrade but first It would be nice that Home Assistant is running again.

btw: Is an inplace upgrade possible?

Is an inplace upgrade possible?

Basically yes, but something not official supported :sunglasses:

Before running the update, do a full backup (better to clone the SD card) to be on save side.

Regarding HA I can run some test, just need to pull an old Stretch image from somewhere :slight_smile:

Thx for the link.
So I f consider an inplace upgrade and this works than I need to do a dietpi-software reinstall 157 again? Hoping then that HA comes back alive with python?

That would be the best case scenario. :slight_smile:

But do a backup before, whatever you do

Home Assistant is back online. Up and running on Buster :wink: .
I wanna thank you for your support!

I will do the same inplace upgrade with my other DietPi RPi.


perfect. Now you are ready for Bullseye which most probably will be released this summer :wink: