I’ve been running HA for a LONG time, using the instructions here for new installs, and it’s always worked as long as an appropriate version of python was present, but it seems that no longer works. I’ve been trying to upgrade my mother’s HA instance, which is running on the REALLY old version 0.76.2 on python 3.6, but NOTHING I’ve done has worked to get it upgraded. I’ve tried everything under the sun that I can think of an everything has failed one way or another. From what I could find, python 3.6 support was removed around 0.103.x, so in theory, I should be able to upgrade to some version prior to that while running python3.6, right? Didn’t work. I tried doing a fresh install on a fresh instance of Ubuntu 20.04 LTS with Python 3.8 installed, of several different versions of HA higher than 0.76.0 and lower than 0.110.0, and all failed. There was at least one failure that complained about a version of a component that was installed by the ‘pip’ install process being too new.
Would I be correct to assume that HA 0.110.7 should install and work just fine on Ubuntu 20.04 LTS, with Python 3.8.10? Assuming ‘yes’, then why did it fail? Here’s the output from that clean install:
Building wheels for collected packages: ciso8601, pyyaml, voluptuous-serialize, aiohttp, voluptuous, ruamel.yaml, python-slugify
Building wheel for ciso8601 (setup.py) ... done
Created wheel for ciso8601: filename=ciso8601-2.1.3-cp38-cp38-linux_x86_64.whl size=30187 sha256=c3e4fe6640ad1a418fd3d5f4715a93bb636bd8729ea4bfdf62d977eb23dde567
Stored in directory: /home/homeassistant/.cache/pip/wheels/55/c3/4c/7f1b3249545f80aa40b0ff3b4029e676e7521559fb9b5aab14
Building wheel for pyyaml (setup.py) ... done
Created wheel for pyyaml: filename=PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl size=44618 sha256=ebbd679f1b2a86d05b4539c36e2b89bbea46e1f70b14a51a6caffb6af4956065
Stored in directory: /home/homeassistant/.cache/pip/wheels/13/90/db/290ab3a34f2ef0b5a0f89235dc2d40fea83e77de84ed2dc05c
Building wheel for voluptuous-serialize (setup.py) ... done
Created wheel for voluptuous-serialize: filename=voluptuous_serialize-2.3.0-py3-none-any.whl size=2521 sha256=4a30992c3b71ee47903b4adf42066190fa08ac821e1f1d8cfeea442bc120eb21
Stored in directory: /home/homeassistant/.cache/pip/wheels/c3/d0/10/3e8ce472b62771ed4a9e291af5fed998c659a5fa70da8eff5a
Building wheel for aiohttp (PEP 517) ... done
Created wheel for aiohttp: filename=aiohttp-3.6.1-cp38-cp38-linux_x86_64.whl size=1460671 sha256=926211732b33e66499cf877c6a654bfe2cb8e5fb7f1e2c8a943e28f6bafc5d22
Stored in directory: /home/homeassistant/.cache/pip/wheels/9b/8a/35/3b15dd96a7c39f21885ec32f16e5d93948eb5b0ac333018ede
Building wheel for voluptuous (setup.py) ... done
Created wheel for voluptuous: filename=voluptuous-0.11.7-py3-none-any.whl size=28747 sha256=3247c08091eedeac25e8b8c50efac94571cdbea8dfa3c0a4085f1cd36ece7658
Stored in directory: /home/homeassistant/.cache/pip/wheels/9b/c9/0e/238ffb22248932b2136eb125c355f03666702191e0099829f7
Building wheel for ruamel.yaml (setup.py) ... done
Created wheel for ruamel.yaml: filename=ruamel.yaml-0.15.100-cp38-cp38-linux_x86_64.whl size=864575 sha256=1ab704cba406f8a2b178c107b57be2512bcdc62fa917428c310d49d0f89cfe43
Stored in directory: /home/homeassistant/.cache/pip/wheels/83/bb/c8/84a46029883fd202fda2e3d0a579eb30641fecb325b9907fb0
Building wheel for python-slugify (setup.py) ... done
Created wheel for python-slugify: filename=python_slugify-4.0.0-py2.py3-none-any.whl size=5487 sha256=93a8b36769be7212de81d5a1ab0f75e191db633da847ad876fa669f40afc20e7
Stored in directory: /home/homeassistant/.cache/pip/wheels/f7/2d/24/7c629dd27a06a60618e6af1004e5667d4e38a1e914493ba72d
Successfully built ciso8601 pyyaml voluptuous-serialize aiohttp voluptuous ruamel.yaml python-slugify
Installing collected packages: ciso8601, zipp, importlib-metadata, pytz, astral, async-timeout, pyyaml, certifi, voluptuous, voluptuous-serialize, multidict, attrs, chardet, idna, yarl, aiohttp, pycparser, cffi, six, cryptography, MarkupSafe, jinja2, bcrypt, urllib3, requests, ruamel.yaml, PyJWT, text-unidecode, python-slugify, homeassistant
Successfully installed MarkupSafe-2.1.1 PyJWT-1.7.1 aiohttp-3.6.1 astral-1.10.1 async-timeout-3.0.1 attrs-19.3.0 bcrypt-3.1.7 certifi-2022.9.24 cffi-1.15.1 chardet-3.0.4 ciso8601-2.1.3 cryptography-2.9.2 homeassistant-0.110.7 idna-2.10 importlib-metadata-1.6.0 jinja2-3.1.2 multidict-4.7.6 pycparser-2.21 python-slugify-4.0.0 pytz-2022.6 pyyaml-5.3.1 requests-2.23.0 ruamel.yaml-0.15.100 six-1.16.0 text-unidecode-1.3 urllib3-1.25.11 voluptuous-0.11.7 voluptuous-serialize-2.3.0 yarl-1.8.1 zipp-3.11.0
And then when I tried to run ‘hass’ to finish the install (leaving the ‘python3 -V’ verification after the failure in there):
(homeassistant) homeassistant@waltershass:/srv/homeassistant$ hass
Traceback (most recent call last):
File "/srv/homeassistant/bin/hass", line 8, in <module>
sys.exit(main())
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/__main__.py", line 337, in main
args = get_arguments()
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/__main__.py", line 84, in get_arguments
import homeassistant.config as config_util
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/config.py", line 48, in <module>
import homeassistant.helpers.config_validation as cv
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/config_validation.py", line 74, in <module>
from homeassistant.helpers import template as template_helper
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/template.py", line 14, in <module>
from jinja2 import contextfilter, contextfunction
ImportError: cannot import name 'contextfilter' from 'jinja2' (/srv/homeassistant/lib/python3.8/site-packages/jinja2/__init__.py)
(homeassistant) homeassistant@waltershass:/srv/homeassistant$ python3 -V
Python 3.8.10
(homeassistant) homeassistant@waltershass:/srv/homeassistant$
This is driving me nuts - I’ve done this several times in the past, and I’ve never had issues when following this venv install or this upgrade.
This is kicking my butt. I should be able to start with a fresh Ubuntu 20.04 install running Python 3.8.10, and run through the steps provided in the previously linked Linux Venv install instructions, running the final install command ‘pip3 install homeassistant==0.110.7’ and have a functioning Home Assistant v0.110.7 install - this hasn’t been the case this time around. It’s like all of the older installers have been broken.
Why are these older versions not working as the used to? Have they actually been broken? If so, they should either be fixed or removed.
As an alternate upgrade, what’s the newest version I can install clean, assuming it’ll work, and plant all of the 0.76.2 config files and DB after the initial clean install and have it upgrade cleanly and work?