Error upgrading HA on Raspbian

Hello community, I’m trying to upgrade HA on Raspbian from 0.67.0 to 0.68.1, using the following commands:

# sudo su -s /bin/bash homeassistant
$ cd /srv/homeassistant
$ python3 -m venv .
$ source bin/activate
$ pip3 install --upgrade homeassistant
Here the output

Looking in indexes: https://pypi.python.org/simple, https://www.piwheels.org/simple
Collecting homeassistant
Using cached https://files.pythonhosted.org/packages/91/73/7c94360e60ea73cacaf4c30ce19bbfa6b8b03921dc81462c22f2735e206f/homeassistant-0.68.1-py2.py3-none-any.whl
Requirement not upgraded as not directly required: requests==2.18.4 in ./lib/python3.5/site-packages (from homeassistant) (2.18.4)
Requirement not upgraded as not directly required: pytz>=2017.02 in ./lib/python3.5/site-packages (from homeassistant) (2018.4)
Requirement not upgraded as not directly required: astral==1.6 in ./lib/python3.5/site-packages (from homeassistant) (1.6)
Requirement not upgraded as not directly required: pip>=8.0.3 in ./lib/python3.5/site-packages (from homeassistant) (10.0.0)
Requirement not upgraded as not directly required: attrs==17.4.0 in ./lib/python3.5/site-packages (from homeassistant) (17.4.0)
Requirement not upgraded as not directly required: certifi>=2017.4.17 in ./lib/python3.5/site-packages (from homeassistant) (2018.4.16)
Requirement not upgraded as not directly required: async-timeout==2.0.1 in ./lib/python3.5/site-packages (from homeassistant) (2.0.1)
Collecting aiohttp==3.1.3 (from homeassistant)
Using cached https://www.piwheels.org/simple/aiohttp/aiohttp-3.1.3-cp35-cp35m-linux_armv7l.whl
Requirement not upgraded as not directly required: jinja2>=2.10 in ./lib/python3.5/site-packages (from homeassistant) (2.10)
Requirement not upgraded as not directly required: voluptuous==0.11.1 in ./lib/python3.5/site-packages (from homeassistant) (0.11.1)
Requirement not upgraded as not directly required: typing<4,>=3 in ./lib/python3.5/site-packages (from homeassistant) (3.6.4)
Requirement not upgraded as not directly required: pyyaml<4,>=3.11 in ./lib/python3.5/site-packages (from homeassistant) (3.12)
Requirement not upgraded as not directly required: idna<2.7,>=2.5 in ./lib/python3.5/site-packages (from requests==2.18.4->homeassistant) (2.6)
Requirement not upgraded as not directly required: urllib3<1.23,>=1.21.1 in ./lib/python3.5/site-packages (from requests==2.18.4->homeassistant) (1.22)
Requirement not upgraded as not directly required: chardet<3.1.0,>=3.0.2 in ./lib/python3.5/site-packages (from requests==2.18.4->homeassistant) (3.0.4)
Requirement not upgraded as not directly required: multidict<5.0,>=4.0 in ./lib/python3.5/site-packages (from aiohttp==3.1.3->homeassistant) (4.2.0)
Requirement not upgraded as not directly required: idna-ssl>=1.0 in ./lib/python3.5/site-packages (from aiohttp==3.1.3->homeassistant) (1.0.1)
Requirement not upgraded as not directly required: yarl<2.0,>=1.0 in ./lib/python3.5/site-packages (from aiohttp==3.1.3->homeassistant) (1.1.1)
Requirement not upgraded as not directly required: MarkupSafe>=0.23 in ./lib/python3.5/site-packages (from jinja2>=2.10->homeassistant) (1.0)
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you’ll have pycryptodome 3.4.11 which is incompatible.
Installing collected packages: aiohttp, homeassistant
Found existing installation: aiohttp 3.1.1
Uninstalling aiohttp-3.1.1:

You are using pip version 10.0.0, however version 10.0.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.

===========
So, it stops there. I tried to upgrade pip as requested but after upgrade, pip won’t starts anymore, so I had to restore the SD cloned image. Another error I can see:
python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.4.11 which is incompatible.

Could someone help me to upgrade HA?
Thank you
Lucas

The correct command for upgrading using raspbian are here

I’m not sure what effect the extra python -m venv . command you typed does, but since it is used to create a python venv, it may not be good.

You’re right, my typo, but unfortunately I still get the same error even with the right procedure :frowning:

python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but you'll have pycryptodome 3.6.1 which is incompatible.
Installing collected packages: aiohttp, homeassistant
  Found existing installation: aiohttp 3.1.1
    Uninstalling aiohttp-3.1.1:

Is there a way to downgrade pycryptodome from 3.6.1 to 3.4.0 as reported by the log? :thinking:

So, you’re saying that the pycryptodome error is not the root cause because HA upgrade fails?

BTW, here is the command to downgrade/install any version:
pip3 install pycryptodome==3.4.0

And HERE the versions list we can install

But still can’t upgrade HA, damn!

The simplest solution to virtual environments that are confused is to delete them and create a fresh one.

When you upgrade HA and get the error of python-jose-cryptodome during upgrade, as due to your version installed is higher than what needed. So when you finish upgraded. Restart your HA you will see that your ha version is already latest. 0.68.1 which mean you can upgrade HA. But with error due to the version check of Python-jose-cryptodome not match.

I agree. I removed the venv (simply deleting the related directory) and then install HA (0.68.1) from scratch. This did the trick.

1 Like