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

These instructions as provided by @anon34565116 have been confirmed to work by myself and others. They are specific to a Hass installation in a venv and were carried out on a Raspbian Stretch Lite OS on a Raspberry Pi 3.

They will download Python 3.7.3 source, build, compile install and replace your current venv w

  1. sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev

  2. wget -O /tmp/Python-3.7.3.tar.xz https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz

  3. cd /tmp

  4. tar xf Python-3.7.3.tar.xz

  5. cd Python-3.7.3

  6. ./configure

  7. sudo make altinstall

  8. sudo apt -y autoremove

  9. cd

  10. rm -r /tmp/Python-3.7.3

  11. rm /tmp/Python-3.7.3.tar.xz

  12. sudo systemctl stop [email protected]

  13. sudo mv /srv/homeassistant /srv/homeassistant_old

  14. sudo mkdir /srv/homeassistant

  15. sudo chown homeassistant:homeassistant -R /srv/homeassistant

  16. cd /srv/homeassistant

  17. /usr/local/bin/python3.7 -m venv .

  18. source bin/activate

  19. pip install wheel homeassistant

20a. ** Note I chose to run hass first time to see all the installation messages.**

20b. sudo systemctl start home-assistant@homeassiith Python 3.7.3

From all the posts on this subject I’ve seen these seem to be the most effective.

Again a big thank you to @anon34565116

7 Likes