So I have a home assistant installed in a virtual environment. Just upgraded python to 3.7 and want to share my experience
First thing you need to install python 3.7
sudo apt update sudo apt install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa sudo apt install python3.7 sudo apt install python3.7-dev sudo apt install python3.7-venv
Then update virtual environment
I am originally I installed virtual environment in /home/ha like this:
python3 -m venv homeassistant
So my virtual environment located in /home/ha/homeassistant You, of cause, will need to replace my path by yours.
Change directory to one level above your current virtual environment
Backup existing installation to be able to go back if something goes wrong
mv homeassistant homeassistant_bkp
Create a new virtual environment
python3.7 -m venv homeassistant cd homeassistant source bin/activate pip install --upgrade pip python3.7 -m pip install mysqlclient python3.7 -m pip install homeassistant
You will need to install any additional packages you are using. In my example, as you can see, I am installing mysqlclient. If you don’t use mysql you don’t need to install it.
Finally, it is currently some bug causing missing frontend package. So, for now, you will need to install it manually:
pip install home-assistant-frontend
That is all. You can run HA as usually after this.