2024.2: More voice, more icons, more integrations, more... everything!

Yet you don’t show them.

Again a Python version bump? I am running Home Assistant on the latest Ubuntu LTS (Ubuntu 22.04.3 LTS, jammy), and already the previous HA-required Python version bump from a couple of months ago was a PITA and gotcha.

I don’t see any need to rush-bump such elementary hard requirements so quickly - Python 3.12 was released on October 3 2023, just four months ago.
Especially this is a questionable UX for a system such as home automation, where one should prioritize stability over latest-versionitis.

Could you provide some recommendations on how to upgrade Python3 gracefully? The last version bump was a real gotcha surprise, breaking my Home Assistant environment for several hours until I figured out how to install the required Python version (… not everyone of your users is a Python version expert when it comes to venvs, implication on other software depending on older Python3 versions, et al.), on a weekend where I had other plans.

At least a big warning would be appropriate to notice that the HA update may cause downtime and will require significant follow-up work until HA can run again.


UPDATE 2024-07-01:
Here are the steps:

# update Home Assistant Core (HAC) venv on an Ubuntu 22.04 (jammy) system to use python3.12 in order to support "Home Assistant 2024.4" and newer HAC versions

# scenario:
# * Raspberry Pi 4B with Ubuntu 22.04 (jammy)
# * currently the HAC installation uses python3.11.9
# * HAC installation was previously (e.g. in 2022) set up as per
#   * https://www.home-assistant.io/installation/linux#install-home-assistant-core
#   * https://www.home-assistant.io/installation/raspberrypi#install-home-assistant-core
#   * notably, HAC venv is located at "/srv/homeassistant"
# * usual HAC update steps as per https://www.home-assistant.io/common-tasks/core/#update 
#   don't update beyond 2024.3.3 because HAC 2024.4+ requires python3.12 .

# if not already set up, add the deadsnakes PPA so that python3.12 is available for installation via apt
# see https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update

# install all python3.12-relevant packages:
sudo apt install python3.12 python3.12-dev python3.12-venv

# sanity-check *system-wide* python3.12 installation:
which python3.12
# shall output "/usr/bin/python3.12"

python3.12 --version
# shall output "Python 3.12.x", e.g. "Python 3.12.4"

# stop homeassistant service
sudo systemctl stop homeassistant.service

# switch to Unix user "homeassistant"
sudo -u homeassistant -H -s

# now in the role of Unix user "homeassistant" 
# backup HAC venv directory
mkdir -p "${HOME}/backups/homeassistant/2024-07-01"
rsync -a /srv/homeassistant/ "${HOME}/backups/homeassistant/2024-07-01/homeassistant"

# see https://docs.python.org/3/library/venv.html
# while OUTSIDE of any venv, upgrade the HAC venv by executing
# "... -m venv --upgrade ..." with the desired python version,
# i.e. by explicitly using the "python3.12" executable:
python3.12 -m venv --upgrade /srv/homeassistant

# if this results in an error with message:
#   "Error: Unable to create directory '/srv/homeassistant'",
# then maybe the path "/srv/homeassistant" has a symlink along its path components?
# if so, then try the following command instead:
# python3.12 -m venv --upgrade "$(realpath /srv/homeassistant)"
#
# command shall exit without any output and with exit status 0.

# activate the upgraded venv
source /srv/homeassistant/bin/activate

# you are now as user "homeassistant" in an homeassistent (the application) venv.
# prompt should look similar to the following:
# (homeassistant) homeassistant@mymachine:/srv/homeassistant$

# ... ignore for a moment that the command "python --version" may still output e.g. "Python 3.11.9", not "Python 3.12.x"

pip3 install --upgrade homeassistant
# olala! something works:
# output:
#   Collecting homeassistant
#     Downloading homeassistant-2024.6.4-py3-none-any.whl.metadata (4.3 kB)
# ...
#
# collects packages, builds wheels, and installs collected packages.
# this can easily take over ten minutes on a Raspberry Pi 4B 
#
# in my case I got the following notice:
#   [notice] A new release of pip is available: 24.0 -> 24.1.1
#   [notice] To update, run: pip install --upgrade pip
# following suit:
pip install --upgrade pip

# continuing with https://www.home-assistant.io/common-tasks/core/#configuration-check :
hass --script check_config

# easily takes 30 minutes and more, as several packages may need to be compiled to the target architecture.
# outputs e.g.:
#   INFO:homeassistant.util.package:Attempting install of colorlog==6.8.2
#   Testing configuration at /home/homeassistant/.homeassistant
#   INFO:homeassistant.helpers.storage:Migrating core.entity_registry storage from 1.13 to 1.14
#   INFO:homeassistant.util.package:Attempting install of home-assistant-frontend==20240610.1
#   ...

# sanity check if the following command gives sensible output on your configuration:
hass --script check_config --info all

# we're done with the Home Assistant update/upgrade.

# time to start up Home Assistant as you usually do
# in my case the following steps were:
# leaving the venv:
deactivate

# leaving the shell as user "homassistant" to get back to my default user
exit

# now back in the role of my default user
# prepare to monitor the usual logs to see if everything starts up nicely, e.g. with
# journalctl -x -f
# Let's start Home Assistant now; in my case it goes like so:
sudo systemctl start homeassistant.service

# took 30 seconds or so until the first Home Assistant log entries appeared
# then the journalctl log shows that even more things get installed/updated, such as:
#   INFO (MainThread) [homeassistant.setup] Setup of domain logger took 0.23 seconds
#   ...
#   INFO (SyncWorker_1) [homeassistant.util.package] Attempting install of bar==4.5.6
# ... but the web interface is already reachable

1 Like

There is no rush to upgrade.

HA core is for specialists. If you’re finding this hard you should consider a different installation method.

Regardless, the steps are usually:

Build Python from sources and make an altinstall as to not interfere with the OS Python. This is what will take longest, but you don’t need to stop HA at this point.

Stop HA, kill the old venv, create a new one and start. This takes maybe a minute or two.

5 Likes
1 Like

Anyone getting full blown crash and dump on 2024.2.1?

Use pyenv - then you can run as many different versions of Python as you need.

No downtime. No impact to other software. No problems.

Or just switch to Docker.

4 Likes

Hi, was hoping somebody might be able to help with this one please.

After installing this Core my Check Configuration (DevTools>>YAML>>Check and Restart) just spins seemingly forever. I have rolled back to pre-update and it’s fine. If I install again I get the same spinning wheel.

EDIT:

Through a process of elimination I found the source of the problem, commented out the following Unifi Direct:

device_tracker:
  - platform: unifi_direct
    host: 192.168.1.9
    username: ME
    password: PASSWORD
    interval_seconds: 15
    consider_home: 30
    new_device_defaults:
      track_new_devices: false

Tuya. I can’t even get the QR to show. All I get is a blank white box(no code in it). I have restarted the server twice and home assistant. Cleared the cache and also used an incognito window. Just a blank white box. Even used different browsers.

OK, I had to change the theme in my profile from Default to Home Assistant and then the QR Code box wasn’t plain white anymore, the QR code shows now.

1 Like

Hi,

I can’t put the logs (too many characters, limited to 32000)
It was replaced this evening, after about 24 hours.
I use HA in Dockers on Nas

Great, as if one wasn’t bad enough :wink: I only saw the description in announcement. Where all three covered there. I only have the MQTT integration set up for Espresense.

In the release announcement on the blog/

Same here! Can’t figure out why either…
Seems to be due to package installation failure from the rollback logs. Will try to dig into this when I have some time…
I suspect it’s gotta do with one of the HACs custom integrations that I have.

Rollback Logs
2024-02-15 15:23:34.991 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package shapely==2.0.1: error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [112 lines of output]
      <string>:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Could not find geos-config executable. Either append the path to geos-config to PATH or manually provide the include_dirs, library_dirs, libraries and other link args for compiling against a GEOS version >=3.5.
      Compiling shapely/_geometry_helpers.pyx because it changed.
      Compiling shapely/_geos.pyx because it changed.
      [1/2] Cythonizing shapely/_geometry_helpers.pyx
      [2/2] Cythonizing shapely/_geos.pyx
      running egg_info
      writing shapely.egg-info/PKG-INFO
      writing dependency_links to shapely.egg-info/dependency_links.txt
      writing requirements to shapely.egg-info/requires.txt
      writing top-level names to shapely.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/numpy/core/__init__.py", line 24, in <module>
          from . import multiarray
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/numpy/core/multiarray.py", line 10, in <module>
          from . import overrides
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/numpy/core/overrides.py", line 8, in <module>
          from numpy.core._multiarray_umath import (
      ImportError: Error loading shared library /tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/numpy/core/_multiarray_umath.cpython-312-aarch64-linux-musl.so: Operation not permitted
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/numpy/__init__.py", line 130, in <module>
          from numpy.__config__ import show as show_config
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/numpy/__config__.py", line 4, in <module>
          from numpy.core._multiarray_umath import (
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/numpy/core/__init__.py", line 50, in <module>
          raise ImportError(msg)
      ImportError:
      
      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.12 from "/usr/local/bin/python3"
        * The NumPy version is: "1.26.2"
      
      and make sure that they are the versions you expect.
      Please carefully study the documentation linked above for further help.
      
      Original error was: Error loading shared library /tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/numpy/core/_multiarray_umath.cpython-312-aarch64-linux-musl.so: Operation not permitted
      
      
      The above exception was the direct cause of the following exception:
      
      Traceback (most recent call last):
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 212, in <module>
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 321, in run
          self.find_sources()
        File "/tmp/pip-install-h_po4oct/shapely_511187308c3b435a921bf6f4e52d7b30/versioneer.py", line 1995, in find_sources
          super().find_sources()
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
          mm.run()
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 550, in run
          self.add_defaults()
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/command/sdist.py", line 102, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
          build_ext = self.get_finalized_command('build_ext')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 305, in get_finalized_command
          cmd_obj.ensure_finalized()
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "<string>", line 134, in finalize_options
        File "/tmp/pip-build-env-jsgp7lnl/overlay/lib/python3.12/site-packages/numpy/__init__.py", line 135, in <module>
          raise ImportError(msg) from e
      ImportError: Error importing numpy: you should not try to import numpy from
              its source directory; please exit the numpy source tree, and relaunch
              your python interpreter from there.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
2024-02-15 15:24:39.340 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package shapely==2.0.1: error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [112 lines of output]
      <string>:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Could not find geos-config executable. Either append the path to geos-config to PATH or manually provide the include_dirs, library_dirs, libraries and other link args for compiling against a GEOS version >=3.5.
      Compiling shapely/_geometry_helpers.pyx because it changed.
      Compiling shapely/_geos.pyx because it changed.
      [1/2] Cythonizing shapely/_geometry_helpers.pyx
      [2/2] Cythonizing shapely/_geos.pyx
      running egg_info
      writing shapely.egg-info/PKG-INFO
      writing dependency_links to shapely.egg-info/dependency_links.txt
      writing requirements to shapely.egg-info/requires.txt
      writing top-level names to shapely.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/numpy/core/__init__.py", line 24, in <module>
          from . import multiarray
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/numpy/core/multiarray.py", line 10, in <module>
          from . import overrides
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/numpy/core/overrides.py", line 8, in <module>
          from numpy.core._multiarray_umath import (
      ImportError: Error loading shared library /tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/numpy/core/_multiarray_umath.cpython-312-aarch64-linux-musl.so: Operation not permitted
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/numpy/__init__.py", line 130, in <module>
          from numpy.__config__ import show as show_config
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/numpy/__config__.py", line 4, in <module>
          from numpy.core._multiarray_umath import (
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/numpy/core/__init__.py", line 50, in <module>
          raise ImportError(msg)
      ImportError:
      
      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.12 from "/usr/local/bin/python3"
        * The NumPy version is: "1.26.2"
      
      and make sure that they are the versions you expect.
      Please carefully study the documentation linked above for further help.
      
      Original error was: Error loading shared library /tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/numpy/core/_multiarray_umath.cpython-312-aarch64-linux-musl.so: Operation not permitted
      
      
      The above exception was the direct cause of the following exception:
      
      Traceback (most recent call last):
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 212, in <module>
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 321, in run
          self.find_sources()
        File "/tmp/pip-install-e43wd6bq/shapely_9976d2e4ad184ecc8f5bace9b6b6d6ac/versioneer.py", line 1995, in find_sources
          super().find_sources()
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 329, in find_sources
          mm.run()
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 550, in run
          self.add_defaults()
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/command/egg_info.py", line 588, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/command/sdist.py", line 102, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 251, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/_distutils/command/sdist.py", line 335, in _add_defaults_ext
          build_ext = self.get_finalized_command('build_ext')
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 305, in get_finalized_command
          cmd_obj.ensure_finalized()
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "<string>", line 134, in finalize_options
        File "/tmp/pip-build-env-_lgce0ap/overlay/lib/python3.12/site-packages/numpy/__init__.py", line 135, in <module>
          raise ImportError(msg) from e
      ImportError: Error importing numpy: you should not try to import numpy from
              its source directory; please exit the numpy source tree, and relaunch
              your python interpreter from there.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Did you get anywhere with this? I couldn’t figure out how to debug it and just rolled back

I think you are on the right track, so either bring it up in the custom integrations github, or disable your integration, your logs seems to say it all

@samuelthng look for something that is requiring numpy, particularly a version that HA builds don’t offer.

trapezoid zones ?

In my case it was a custom (HACS) integration that caused the issue. The Hikvision integration created odd unique IDs for the entities and this threw HA.

Removing that integration resolved the issue. I gather the Hikvision code has been updated to stop that and HA might have been updated to work around it.

I guess other custom components might have been doing the same thing.

You’re right, I removed this HACs package and the update succeeded. I’m guessing it’s not a numpy issue.

That one package shapely probably has some issues in the current version. :smiling_face_with_tear:

Thank you all!

1 Like