Martin Buist -  IT Blogger
Home » Home Assistant – Upgrade Hassbian from python 3.4 to python 3.6

Home Assistant – Upgrade Hassbian from python 3.4 to python 3.6

It looks hard but it is not. The configuration files are stored outside the virtual environment so it will not overwrite when upgrading.

We install python 3.6 then remove the current virtual environment. We create a new virtual environment with python3.6. Install hass in this environment as the homeassistant user and done

Lets get started

#Update the system
sudo apt-get update

#Install the packages
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

#Install python
tar xzvf Python-3.6.0.tgz
cd Python-3.6.0/
sudo make install

#Remove and recreate the virtual env
cd /srv
rm -rf homeassistant
sudo mkdir homeassistant
sudo chown homeassistant:homeassistant homeassistant

sudo su -s /bin/bash homeassistant
cd /srv/homeassistant
python3.6 -m venv .

#active the new enviroment and install home assistant
source bin/activate

pip3 install homeassistant

#It will take a while to start the first time

Leave a Comment

Add comment

Most Popular Post

Follow Me

Your Header Sidebar area is currently empty. Hurry up and add some widgets.

Contact Us