New version 0.94.0 - How update Python in a Pi3 from 3.5.3 to 3.7.3?

The crazy thing is, I mainly followed the script the Hassbian folks wrote but the HASS developers do not care enough to share with others who could use it.

And a little lateral thinking unearthed a gem for all to use now :joy:

1 Like

OK. Yes me again.
Fearing breaking my working system I bought a new Pi3 B+ from Amazon to experiment on.
After setting it up, doing all the updates et al I went through ConcordeGEā€™s steps.
I got further but still failed at first.
Crawling through the messages I found it was missing a uuid include folder and the ffi headers/librarys so google found them as
sudo apt-get install uuid-dev libffi-dev
I redid the ./configure and the make and it claims to have worked.
Iā€™ll put it on the working rig tomorrow.

Basically: Thank you to everybody who made suggestions.

1 Like

And just realise what youā€™ve learned on the journey too. Believe me it was worth it.

1 Like

Iā€™d move to using docker as it removed a lot of the dependency hasslesā€¦

1 Like

Not on a Pi.
You do not want the added load of Docker on such a small CPU.

Itā€™s like 3% and a non issue. If you are concerned over performance even bare metal on a rPI is a issue.

1 Like

I agree. Thereā€™s no issue with docker on a Pi3ā€¦

Donā€™t you thinks the issue will simply go away when python is upgraded as part of the raspbian stretch distro? Hoping of course this will not be too far out.

Nice ! A big thanks for your Tuto @ConcordGE :slight_smile:

1 Like

Actually it will go away with the next Raspbian release, Raspbian Busterā€¦ No release date has been set but the Hassbian image now uses the unstable Raspbian Buster.

I depends on the Pi, on the quad core models iā€™ve not found CPU to be limited.

I/O however is, especially if you store the DB on the SD card

@anon34565116. Thanks for the clarification.

1 Like

So seeing as Buster is about to be released and being a thrill-seeker I decided to upgrade my NUC Debian to Buster on the weekend and also 3 of my Raspberry Piā€™s.

The NUC/Debian system I use for Home Assistant upgraded easily with no problems. The Pi running FreePBX also was no problems at all.

The Pi I use for my Coffee Roaster which ran a desktop version upgraded fine BUT there is no desktop available for Buster on the Pi so my VNC session was a disappointment showing just a blank screen with a message that the desktop could not be displayed so I just restored a Stretch image backup and I was good to go,

The Pi I use for my Apple Time Machine ā€˜cloneā€™ wouldnā€™t even run after the Buster upgrade. Couldnā€™t even ssh into it - no response. I also did a stretch install and upgraded that to buster ant then tried to install netatalk but it couldnā€™t install the dependencies so I just restored a Stretch image backup and itā€™s working again as well.

I would anticipate that an official Buster Upgrade for Raspbian and/or install will be several months away and most probably after Python 3.5.3 is retired in Home Assistant. Provided you are running Raspbian Lite with no desktop, it will probably be ok if you upgrade by changing the source from stretch to buster as documented extensively on many sites. Or just upgrade Python and wait for the official release of Buster for the Pi and go from there.

Buster is about to be released, possibly within days or latest July I believe. Itā€™s not ā€˜unstableā€™ although there will likely be further tweaks until then. If you do decide to do an upgrade, just make sure you make a full image of the SD-Card so if you need to rollback itā€™s painless.

If you are using zwave my recommendation is to wait. I was running Python 3.7 and noticed that sometimes zwave would crash Home Assistant. I decided to revert back to Python 3.5 for now. I do not know if 3.6 is a good option.

I ran 3.6.3 on my HA RPi 3b+ alongside zwave before I switched over to the NUC and never had any issues.

1 Like

Instructions of @anon34565116 worked nicely after adding

apt-get install libffi-dev

IĀ“ve got the error described in the link below, adding libffi-dev solved it:

https://stackoverflow.com/questions/27022373/python3-importerror-no-module-named-ctypes-when-using-value-from-module-mul/41310760

kr
jo

@anon34565116, THANK YOU, very useful recipe!!

1 Like

Thanks for the kudos. I recently moved on to a different platform with goals that more closely match mine. Here is a qiote from one of their developers with an idea that would be considered radical here.

A Home Automation server has to be 1) stable, 2) stable and 3) stable and 4) you shouldnā€™t run anything else on there.

I am finding it a refreshing change. although the learning curve is steep I finally moved over a week agoā€¦

Do you think these instructions will work for Ubuntu 18.10 running in a Proxmox CT?

Iā€™ve no idea. Just back up your install and give it a try. Thereā€™s so many variations in platforms that HA is running in you couldnā€™t cover all bases.

1 Like