Python upgrade

In a separate post from @bosbourne he listed a successful method of upgrading Python to 3.7.3 with Hass in situ. It has worked for a number of users.

  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 [email protected]

6 Likes