This worked for me but haven’t tried running HA yet.
I just downloaded Python-3.8.6, and installed via make altinstall on Ubuntu 18.04.5 LTS full up to date.
The created a virtual enviroment for HA
I started again to see if I could reproduce, but this time after install python3.8 and activating the venv, I updated pip (py38ha) pip install pip --upgrade and I did not get the error again.
I followed these directions above and they worked well. I have HA installed manually on a RPi and the only issue I had was errors setting up Zwave, specifically
ERROR:homeassistant.util.package:Unable to install package homeassistant-pyozw==0.1.10
and
error: openzwave-embed/open-zwave-hass/libopenzwave.a: No such file or directory
I think it’s fair to say that most Homeassistant users are running Raspberry Pi OS on a Raspberry Pi. Has any thought been given to the wisdom of requiring a Python version ahead of what Raspberry Pi OS offers?
There’s probably a fair share of people using Raspberry Pi OS, but most of them run HA supervised which doesn’t care about your python version. People using venv are the minority and most of them use it because they have enough experience with linux/python and don’t have any issue with updating a python version. The other people that use venv are in my experience using venv because they started when the docker installs didn’t exist and never bothered to switch to the docker installs or people that read a tutorial somewhere that advised them to install it in a venv or people that simply choose the wrong install method because they are afraid of docker or dimilar things.
Not at all, but it is what it is. You’re between a rock and a hard place, and the only practical solution is for you to up-skill. The developers aren’t going to change their mind because a minority of users, using a method they’ve tagged as an expert installation method, have issues.
Learning how to upgrade Python, or even just following any of the many guides (see below), is really the only option you’ve got here:
Most of these are the same basic process, and will work for version 3.8, 3.9, 3.10 and so on. Heck, I ended up writing a script I can run that does all the heavy lifting for me.
Another more basic question:
I have a Pi core installation i.e. a user “pi” and a user “homeassistant” with its own virtual env for a fresh python3.8.6 installation.
In my understand the venv python (under /srv/homeassistant) has still access to all modules with I install as user “pi” (under /usr/local/lib/python3.8/site-packages) ?