FIrst “problem”: Python 3.5 won’t be compatible with the new versions of HA since next August
To upgrade to Python 3.7
Step 1. Before we install any software, it’s important to make sure your system is up to date by running these following apt-get commands in the terminal:
Step 2. Installing Python 3.7 on Debian 9.
Download Python using following command from python official site:
tar xf Python-3.7.3.tar.xz
Next, compile python source code on your system:
Once the process is complete, check version of Python 3:
After compile the new version of python from source, we can now configure Debian to make it our default version of python3.
update-alternatives --install /usr/bin/python python /usr/local/bin/python3.7 10