Home Assistant upgrade to 2022.12.x and numpy

Hello,
I’m experiencing this issue with Python 3.9 (going to upgrade …), venv + core HA.
After upgrading from 2022.11.x to 2022.12.x everything went fine (…).
But, after restarting HA, I noticed this error:

2022-12-22 03:59:17.275 ERROR (MainThread) [homeassistant.setup] Setup failed for cloud: Unable to import component:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.
We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "/srv/homeassistant/bin/python3"
  * The NumPy version is: "1.23.2"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: /lib/arm-linux-gnueabihf/libm.so.6: version `GLIBC_2.29' not found (required by /srv/homeassistant/lib/python3.9/site-packages/numpy/core/_multiarray_umath.cpython-39-arm-linux-gnueabihf.so)

BTW this impacts also mobile connectivity management, …
After searching a while I found this solution:

stop HA

sudo -u homeassistant -H -s

source /srv/homeassistant/bin/activate

pip3 install numpy --global-option="-mfloat-abi=hard" --force-reinstall

exit

start HA

And after that everything is fine …
But, if I stop HA and restart it I’m back in this loop.

OK, I’ll plan Python upgrade to 3.10 or whatever, but what I’m missing with this weird behavior?
Thanks a lot in advance and kind regards,
Franco

I’m facing the same issue but with Python 3.11 after upgrading to HA 2023.11.

1 Like

Here also this problem when upgrading to HA 2023.11 ; when opening a python shell, and doing import numpy, it showed libopenblas0 was missing.

apt install libopenblas0 solved it at my raspi.

1 Like