hi, i have installed HA on a LXC debian 9 system, this run very well but a few weeks ago I was warned to upgrade the version of Python at least to 3.6, no problem!
Download and compile the sources of the 3.7, install it and set up the system so that it runs all the python scripts with the latest version, control and everything works well:
usr@HOMEAUTOMATION:/var/lib/home-assistant# python -V
Python 3.7.3
usr@HOMEAUTOMATION:/var/lib/home-assistant# update-alternatives --config python
There are 3 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/python3.7 3 auto mode
1 /usr/bin/python2.7 1 manual mode
2 /usr/bin/python3.5 2 manual mode
* 3 /usr/bin/python3.7 3 manual mode
Press <enter> to keep the current choice[*], or type selection number:
but, BUT, B U T
HA start every time with python 3.5, i look at the start-up systemd configuration:
usr@HOMEAUTOMATION:/var/lib/home-assistant# cat /etc/systemd/system/home-assistant.service
[Unit]
Description=Home Assistant
After=network.target
[Service]
User=hass
Group=hass
Type=simple
ExecStart=/usr/bin/hass --config /var/lib/home-assistant
[Install]
WantedBy=multi-user.target
and at the script:
usr@HOMEAUTOMATION:/var/lib/home-assistant# cat /usr/bin/hass
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from homeassistant.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(main())
how i can fix this? I tried to change the interpreter to python3.7 but this not work.
debian -> 9.9
HA -> 0.94.4
python -> 3.7