Problems upgrading

I tried updating my HASSbian for the first time and ran into a problem:

  Found existing installation: Jinja2 2.7.3
    Not uninstalling Jinja2 at /usr/lib/python3/dist-packages, outside environment /srv/homeassistant
*** Error compiling '/tmp/pip-build-dz9x_46p/jinja2/jinja2/asyncfilters.py'...
  File "/tmp/pip-build-dz9x_46p/jinja2/jinja2/asyncfilters.py", line 7
    async def auto_to_seq(value):
            ^
SyntaxError: invalid syntax

*** Error compiling '/tmp/pip-build-dz9x_46p/jinja2/jinja2/asyncsupport.py'...
  File "/tmp/pip-build-dz9x_46p/jinja2/jinja2/asyncsupport.py", line 22
    async def concat_async(async_gen):
            ^
SyntaxError: invalid syntax

  Found existing installation: setuptools 5.5.1
    Not uninstalling setuptools at /usr/lib/python3/dist-packages, outside environment /srv/homeassistant
Successfully installed homeassistant pip voluptuous requests aiohttp typing jinja2 setuptools packaging appdirs pyparsing
Cleaning up...

At this point when I restart I am greeted with invalid configs for a multitude of components including switch.mochad, automation.sun, mochad, sun, tts.google, and discovery.

I’ve restored using a backup image but I’m afraid that I’m stuck and cannot upgrade. Can someone offer any advice on what might be going wrong? I followed the update instructions verbatim.

Not sure, but it seems Python is referring to the system Python and not the virtualenv Python. Have you activated the virtualenv ?

I’m pretty certain I know what happened. I had problems with getting Zwave to work and this is the solution I used:

HA complaining python-openzwave is not installed even though it is - #21 by dinki?

This was the only way I could get Zwave working, but I never switched this back. I’m guessing that this is the problem. Can you confirm?

Also, is there a reason that Zwave is not included with HASSbian. I know not everyone uses Zwave but it is/was pretty popular.

Thanks