Home Assistant is strange. You can't install it "normally" on a Pi because Python is too old (it wants 3.8, Raspbian has 3.7). You can install it via Docker but then you can't use Add-Ons. If you want full functionality you're really left with one choice - install their entire OS image on a dedicated Pi. For a collection of Python scripts.

@8none1 you could install Fedora 34. It currently has Python 3.9.6.

@fedops Yeah, not a bad plan. I would prefer to stick with Raspbian (or Raspberry Pi OS as I think it now is) as I'm more familiar with Debian based distros. I could install Ubuntu even - I just dont wanna. :)

@8none1 I understand. 😄

Strange that they have missed quite a few updates...

@8none1 does it not work with Ubuntu 20.04 or newer? Those have Python 3.8+.

@artfulsodger I imagine that it does, but I'm already running Raspbian on my Pi4 and I don't want to have to blow it away and start again.

@8none1 it makes sense to stick with your existing OS and setup if you don't want to spend more time on redoing it. Have you tried using 'pyenv' to install a supported python version, alongside the system python? It does require some work, but that should still be a lot simpler than nuking and paving.

@artfulsodger @8none1 every time I had worked some place that did python we always ran into this kind of problem when it came time to deploy products to real end users. Then it became do we restrict it to just a couple of very specific distros that had bundled correctly usable versions of python and dependencies? Do we also create python virtual environments as part of deployment? This is why I didn't use python in my own stuff...

@artfulsodger @8none1 ruby is a little better both in terms of more reliable range of backward compatibility offering a wider range of pre-packaged distros that can be used as-is, and in that ruby bundler feels somewhat simpler to use in deployment scenarios than python virtual environments. But it is only easier in degree. However, it was enough for me to prefer ruby over python.

@artfulsodger @8none1 there were other reasons I found a preference for ruby over python, but production deployment with ruby bundler and Gemfiles vs python venv and requirements.txt was among them.

@8none1 what about ubuntu as a base? :-) for non desktop end user experience it seems to give more than raspbian. Plus could add a dreaded ppa if some packages still not new enough?

@8none1 What about installing pyenv and building Python with it?

@Hanuwu @8none1 yeah it's super easy and if you use "make altinstall" it doesn't replace the system's python at all.

Only tricky part is that the configure will happily skip useful stuff almost silently if you don't have all the needed -dev packages.

@8none1 Still on an old version of Home Assistant for that reason.

Hopefully now the new version of Debian is out, it won't be long before the Raspbian folks catch up.

@8none1 They do seem to have built a pretty high barrier to entry. It's an interesting platform, but ease of use isn't high on their list of priorities.

@mike @8none1 I actually disagree - what they are targeting is to have a reliable system. To do this they limit it to modern versions of python, because that's what they test and develop with.

They also push people strongly to us the os image. Why? Because it's going to be the best user experience for their users, easy to update, easy to use all the add-ons etc. Also, many of the low level network features, to discover IoT devices, work if you dedicate the whole pi to the platform.

@8none1 I guess it's a legacy to the Debian version they are starting from. Do they have a Bullseye-based release planned any time soon?
Sign in to participate in the conversation

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.