You dropped support for python 3.4 and have bumped the minimum version to Python 3.5.3
The currently supported long term support version of Ubuntu 16.04 comes with version Python 3.5.2 so I can no longer run home assistant on my up to date operating system.
Can you change the minimum python version down to 3.5.2 for the next few months until the next long term support version is released in one months.
How to upgrade python https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get
Why we require python 3.5.3 https://community.home-assistant.io/t/0-65-rename-entities-new-filter-sensor-upcloud-and-channels/46331/16?u=danielhiversen
@Danielhiversen the linked solution will just install Python 3.6 as python3.6
, and python3
will still point to 3.5.2.
One could symlink /usr/bin/python3
to /usr/bin/python3.6
and have HomeAssistant (probably) working, but would risk severe and unpredictable problems with the rest of the distro's components that use compiled Python extensions. For example, apt
is already known to have problems.
EDIT: HA fails to start for me with the given solution applied, no relevant logs.
Create a virtual environment first and specify the python version that should be used for the environment. Then install home assistant inside the environment. Then you don't need to change any system defaults.
Another challenge is that the suggested PPA (deadsnakes) does not supply pip3 for python3.6 you have to curl some external stuff it seems, but I'm a bit weary that will break other stuff as it's not part of the package, I would execute that outside of a venv (feels like a catch-22).
That's not my experience. You don't need to install a specific pip3 for Python 3.6 before creating the environment.
I know this is not the place to solve python venv problems, but this is what happens for me after installing python3.6 from the forementioned PPA:
# python3.6 -m venv test
Error: Command '['/opt/test/bin/python3.6', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
Found the solution:
https://stackoverflow.com/questions/43278420/pythonanywhere-python3-6-m-venv-test-results-in-error
You can use virtualenv
and preferably also virtualenvwrapper
, which are python packages, to create and handle virtual environments.
This is a nice guide and overview on python package management for Ubuntu:
http://chrisstrelioff.ws/sandbox/2016/09/21/python_setup_on_ubuntu_16_04.html
My virtualenv prefix is /opt/homeassistant
and my HA instance runs as the user homeassistant
with the config in the home dir (/var/lib/homeassistant/.homeassistant
).
I was able to upgrade to Python 3.6 by replacing the existing virtualenv:
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install -y python3.6-venv python3.6-dev
# now start shell as homeassistant user with HOME set
sudo -u homeassistant -H -s
rm -rf /opt/homeassistant/*
python3.6 -m venv /opt/homeassistant
. /opt/homeassistant/bin/activate
# verify that the new venv has pip preinstalled
pip3 --version
pip3 install homeassistant
Then all I had to do was restart the service (in my case hass is started as /opt/homeassistant/bin/hass -c "/var/lib/homeassistant/.homeassistant"
).
Thanks trisk - one small change
. /opt/homeassistant/activate to . /opt/homeassistant/bin/activate
Does recreating the virtualenv pose any risk to the existing HA configuration (stored in ~homeassistant/.homeassistant) and other systems that depend on HA (like appdaemon)?
I'm using a different PPA for python3.6 which provides builds for armhf and arm64 as well
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt-get update
sudo apt-get install python3.6 python3.6-venv python3.6-dev
Thanks
Does recreating the virtualenv pose any risk to the existing HA configuration (stored in ~homeassistant/.homeassistant) and other systems that depend on HA (like appdaemon)?
No, it does not affect the HA configuration.
This is stupid, why would you break usage on the most widely used Linux OS? At least if you're going to do this provide a guide to a workaround for novice users.
Worse decision yet.
@shaun-ba
I am sorry that you see it that way.
A quick google search, will give this guide: https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get
@Danielhiversen As 100s of people have said and comment on the forums etc this is not a valid workaround, installing a separate python version that does not replace the existing version is not a workaround, a lot more work is required for a novice user to get this running.
You've effectively wiped out 20% of your users, it's not "that I see it that way", it's clear from comments that it was a bad and premature decision to make, the next LTS release is this month if not already.
what's the point of this discussion? 3.4 support won't come back and Ubuntu is not our primary platform...
It's not a discussion, as you just say a bad decision was made and it won't now be reverted.
This is a great project, but attitudes like this towards novice users mean it won't be adopted as well as it could be.
I think that novices are expected to go with hass.io, and if you install it
yourself on your system you're not a novice anymore (congrats!). But I
agree, not all architectures have a ppa for Python 3.4. However, I suspect
that the docker version doesn't have this problem because it ships with
python included.
On Mon, Apr 23, 2018 at 5:19 PM, Shaun G notifications@github.com wrote:
It's not a discussion, as you just say a bad decision was made and it
won't now be reverted.This is a great project, but attitudes like this towards novice users mean
it won't be adopted as well as it could be.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/home-assistant/home-assistant/issues/13089#issuecomment-383592146,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEDvKvQvYYoJMZNmNa0BFMbXjkFiYWu8ks5treMKgaJpZM4SluEH
.
Most helpful comment
I think that novices are expected to go with hass.io, and if you install it
yourself on your system you're not a novice anymore (congrats!). But I
agree, not all architectures have a ppa for Python 3.4. However, I suspect
that the docker version doesn't have this problem because it ships with
python included.
On Mon, Apr 23, 2018 at 5:19 PM, Shaun G notifications@github.com wrote: