In fairness, I was presuming from the way you worded your first post that you’d already installed a newer python version, but realised that you can’t ‘upgrade’ the venv.
Adding installation of python to the process, let’s call it a nice round 15 minutes, with time for a tea break at half time.
Honestly, it’s easy as pie.
Download and install python 3.6.4, delete the old venv (NOT your homeassistant folder!), create a new venv with python 3.6, install homeassistant in it, done.
I’ve just looked in that thread you linked to, and I can see why you were apprehensive. There is no reason to do half of the steps in there.
As soon as you copy in your configuration and run homeassistant it will install all the requirements you need, same as it would if you added a new component and restarted. So all that saving requirements.txt is guff tbh (no offence to the author of that thread)
Yeah, agreed, some super-awesome server device but that would just be for fun, the actual install of homeassistant would still be a venv on whatever device I happened to decide was the most minty for shelling out the cash on.
i have zwave and followed the steps in that thread. I skipped the part about requirements.txt and instead did a normal home assistant install once python was updated. Once you copy your configuration everything else will reinstall. If you see any errors in the logs you can most likely manually install the failed module.
My personal install is on a venv in a i5 with 6gb of RAM on a SSD…runs really smooth and hass restarts are 30 seconds normally. I am also running zoneminder, nextcloud, node-red, inlfuxdb and grafana.
Step by step, because I’m sat at work bored so may as well…
(Assumes you have a privileged user, and an unprivileged account called homeassistant upon which you run your instance, and that the venv is located at /srv/homeassistant)
STOP HOMEASSISTANT FIRST
Starting as privileged user…
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
wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tgz
tar xzvf Python-3.6.4.tgz
cd Python-3.6.4/
./configure
make
sudo make install
Make tea
cd /srv/homeassistant
sudo rm *
cd ..
sudo chown homeassistant:homeassistant homeassistant
sudo su -s /bin/bash homeassistant
cd
mv .homeassistant/ .homeassistant_backup
cd /srv/homeassistant
python3.6 -m venv .
source bin/activate
pip3 install homeassistant
hass
Wait a minute, press ctrl + c
deactivate
cd .homeassistant
rm *
cd ..
mv .homeassistant_backup/* .homeassistant/
exit
sudo reboot
Presuming your autostart service was working before and we’ve installed everything back to the exact same place should be back up and running pretty sharpish. Remember that when it restarts it will be downloading all the requirements and dependencies specific to your installation so it may take a while.
That approach can be a double edged sword. When you do decide to upgrade the chances of hitting breaking changes is higher, and you probably have to address several at once.
Plus finding bugs in every new version helps the software to be better in the long run.
@anon43302295 That worked perfectly. No glitches, booted right back up. You didn’t even have any typos (are you a robot? not judging, just curious). Thanks for all the help.
Expanding on the original question here. With Home Assistant (HA), AppDaemon (AD) and the AD web Dashboard running on the same box, my environment was overwhelming my PI, even breaking it out to two PI’s was still giving me performance issues. So I bit the bullet and bought one of these little headless bricks that are about the size of 2 PI’s put together. This resolved my performance issues and has been rock solid since I did it about 2 months ago.
Because I now have a more powerful system I felt the need to setup virtual environments for HA and AD. This protects them from each other and from any other applications I might decide to install on this server in the future. If you are limiting your server to just HA and AD, and your are not a developer that needs isolated installs of AD or HA, then there really isn’t a need for virtual environments or docker installs in my opinion. Just use the basic install. Personally, I would stay away from hasio for a while (6 months or so) longer until it’s growing pains have subsided.
If that was for me, in reference to upgrading to python 3.6.4, then yes those commands should work (so long as the users and venv location are correct).