I recently setup HA under Python 3.6 on a fresh Raspbian Stretch image, inspired by this thread (thanks to all!).
I have a second Rpi 3 and MicroSD card for this type of development, and simply copy over my configuration and swap cards. That way, I don’t mess up my “production” HA, and always have an easy fall back (put the old card back in). I started with Raspbian Stretch, September release.
@rcervenan as user pi you have no appropriate right to write in this directory. become user homeassistant and than it should work (in many venv installations this is a system account, so use the command sudo su -s /bin/bash homeassistant , than make sure your current directory is /home/homeassistant )
Just wanted to thank you @ttaidapos for these instructions.
I was able to upgrade to Raspbian Stretch and also Python 3.6
Everything worked without any issues. I did however have to make a change to my systemd startup service file as it had an extra “homeassistant_env” in the path that I don’t have with the new setup. But all seems fine now. Thanks again.
We need to update the first post for anyone coming from an AIO installation and instead of:
pip3 install -r requirements.txt
it should be:
pip3 install homeassistant
My installation was not even starting until I did this. I saw another post in here mention it but updating the first post may help the next person lol.
Also those users need to make sure that they update the service accordingly (remove homeassistant_venv)
Nope - no developer stepped forward to support it, so it was removed. If you want a faster solution use Hassbian.
Bit of background (as best I understand it): AIO came about back when Hassbian was just the OS + HA, and would include OpenZWave and Mosquitto. Some time back OZW started being installed on demand, and Hassbian included support for installing Mosquitto. As well the original drive for Mosquitto was OwnTracks, and the HTTP module means that Mosquitto is no longer so critical.
As a result, the AIO installer had been replaced by Hassbian for those after a quick initial install, and the virtual environment install is now enough for most people who’re adding HA to an existing build.
On my raspberry pi3 I ran sudo grep -ir 'name="networkkey"' / and saw that there was a new location for the key. I added the key to that file (a default one was commented out).
I’m not savvy enough to understand the files you shared, but after the update of the venv, despite commenting out the open z-wave stuff from my requirements.txt , once I did a version update of home assistant, my z-wave network was working fine. I just had to add the network key to get my door lock working again. Not sure if I also removed/added it to my network.
thanks for this guide, was able to upgrade my venv from 3.4 to 3.6, I’m using hassbian. I had to reconfigure nest, spotify and cloud setup by removing their cache (.spotify-token-cache, nest.conf and .cloud/production_auth.json). everything’s working.
really odd thing about this – spotify card isn’t showing even if it was successfully authenticated (there’s a .spotify-token-cache). debug doesn’t help at all.
i tried to use the 3.4 virtual environment ( i just moved it instead of deleting), and spotify shows using it.
EDIT: solved. had to put cache_path after upgrade to python 3.6. i might have set an env on the 3.4 environment.
Nice one. Interested to know more as i’ve been meaning to do this. Haven’t grasped github just yet. Makes me wonder if cron job or some HASSIO feature I haven’t yet read about just yet.
I successfully (so far at least) went to Python 3.6.5 using the guide, so massive thanks to @turboc for putting it all in one place. The only issue I had wasn’t from this guide, but I thought it might help someone doing what I did while following the guide.
After following the guide and restarting HA, I got a python error importing the pip.locations function. When I decided to upgrade Python to the latest release (and deal with any issues along the way), I also followed the pip notification that pip 10.0.0 was out and I was running 9.0.1, and upgraded to the latest version there too. That was the issue, so I had to downgrade to pip 9.0.3 (using pip3 install pip=9.0.3). More details in this thread (huge thanks to @pemontto for that post).
Anybody running hass/pi with 3.7.x? If yes, which version exactly and what steps did you follow? Please include your hass version as well. I’m on 3.6.3 and I think it’s a root cause for a lot of the google assistant errors i’m getting in the logs.