Search Posts

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
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar xzvf Python-3.6.0.tgz
cd Python-3.6.0/
./configure
make
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
Hass

#It will take a while to start the first time

1408 Total Views 12 Views Today

Leave a Comment

Leave a Reply