DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

Home Assistant 2024.10 failed after update from 2024.9.3

Open whyisthisbroken opened this issue 1 year ago • 48 comments

ADMIN EDIT

To solve the issue now:

sudo systemctl stop home-assistant
sudo grep -q 'UV_SYSTEM_PYTHON' /home/homeassistant/pyenv-activate.sh || sudo sed -i '/^export /a\export UV_SYSTEM_PYTHON=1' /home/homeassistant/pyenv-activate.sh
sudo rm -R /mnt/dietpi_userdata/homeassistant/deps
sudo ln -sf /home/homeassistant/.pyenv/versions/3.12.*/lib/python3.12/site-packages /mnt/dietpi_userdata/homeassistant/deps
sudo systemctl restart home-assistant

Creating a bug report/issue

  • [x] I have searched the existing open and closed issues

Required Information

  • DietPi version G_DIETPI_VERSION_CORE=9 G_DIETPI_VERSION_SUB=7 G_DIETPI_VERSION_RC=1 G_GITBRANCH='beta' G_GITOWNER='MichaIng'
  • Distro version bookworm 0
  • Kernel version Linux HomeNetDNS 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • SBC model RPI 4 8GB

Additional Information (if applicable)

  • Software title | Home Assistant
  • Home Assistant 2024.9.3 / Frontend 20240909.1
  • Can this issue be replicated on a fresh installation of DietPi? I dont know

Steps to reproduce

  1. /home/homeassistant/homeassistant-update.sh
  2. Home Assistant update in background much depencies..
  3. Home Assistant starts but could not load anything.

Expected behaviour

  • Update and work like before :)

Actual behaviour

  • Update and not working like before :(

Extra details

  • This Error comes at evry update depencie: error: No virtual environment found; run uv venv to create an environment, or pass --system to install into a non-virtual environment

After Update and HA want start this comes...

  • Oct 03 08:15:58 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:58.319 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'recovery_mode'. Setup failed for dependencies: ['frontend', 'cloud'] Oct 03 08:15:58 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:58.320 ERROR (MainThread) [homeassistant.setup] Setup failed for 'recovery_mode': Could not setup dependencies: frontend, cloud

Example of most of the Errors coming during the installation:

Oct 03 08:14:46 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:14:46.547 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package home-assistant-intents==2024.10.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:14:49 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:14:49.444 ERROR (SyncWorker_0) [homeassistant.util.package] Unable to install package home-assistant-intents==2024.10.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:14:52 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:14:52.313 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package zeroconf==0.135.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:14:55 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:14:55.097 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package zeroconf==0.135.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:14:57 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:14:57.929 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package zeroconf==0.135.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:14:57 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:14:57.932 ERROR (MainThread) [homeassistant.setup] Setup failed for 'zeroconf': Requirements for zeroconf not found: ['zeroconf==0.135.0'].
Oct 03 08:15:00 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:00.747 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package cached-ipaddress==0.6.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:03 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:03.570 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package cached-ipaddress==0.6.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:06 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:06.393 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package cached-ipaddress==0.6.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:06 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:06.395 ERROR (MainThread) [homeassistant.setup] Setup failed for 'dhcp': Requirements for dhcp not found: ['cached-ipaddress==0.6.0'].
Oct 03 08:15:09 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:09.218 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package python-matter-server==6.5.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:12 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:12.070 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package python-matter-server==6.5.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:14 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:14.934 ERROR (SyncWorker_3) [homeassistant.util.package] Unable to install package python-matter-server==6.5.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:14 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:14.937 ERROR (MainThread) [homeassistant.setup] Setup failed for 'cloud': Requirements for matter not found: ['python-matter-server==6.5.2'].
Oct 03 08:15:14 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:14.965 ERROR (MainThread) [homeassistant.setup] Setup failed for 'shelly': Requirements for zeroconf not found: ['zeroconf==0.135.0'].
Oct 03 08:15:14 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:14.970 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'logbook'. Setup failed for dependencies: ['frontend']
Oct 03 08:15:14 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:14.971 ERROR (MainThread) [homeassistant.setup] Setup failed for 'logbook': Could not setup dependencies: frontend
Oct 03 08:15:15 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:15.003 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'my'. Setup failed for dependencies: ['frontend']
Oct 03 08:15:15 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:15.005 ERROR (MainThread) [homeassistant.setup] Setup failed for 'my': Could not setup dependencies: frontend
Oct 03 08:15:15 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:15.007 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'hacs'. Setup failed for dependencies: ['frontend']
Oct 03 08:15:15 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:15.008 ERROR (MainThread) [homeassistant.setup] Setup failed for custom integration 'hacs': Could not setup dependencies: frontend
Oct 03 08:15:15 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:15.032 ERROR (MainThread) [homeassistant.setup] Setup failed for 'hue': Requirements for zeroconf not found: ['zeroconf==0.135.0'].
Oct 03 08:15:15 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:15.034 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'map'. Setup failed for dependencies: ['frontend']
Oct 03 08:15:15 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:15.035 ERROR (MainThread) [homeassistant.setup] Setup failed for 'map': Could not setup dependencies: frontend
Oct 03 08:15:15 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:15.196 ERROR (MainThread) [homeassistant.setup] Setup failed for 'conversation': Requirements for conversation not found: ['home-assistant-intents==2024.10.2'].
Oct 03 08:15:15 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:15.617 ERROR (MainThread) [homeassistant.setup] Setup failed for 'mobile_app': Requirements for conversation not found: ['home-assistant-intents==2024.10.2'].
Oct 03 08:15:18 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:18.057 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'assist_pipeline'. Setup failed for dependencies: ['conversation']
Oct 03 08:15:18 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:18.058 ERROR (MainThread) [homeassistant.setup] Setup failed for 'assist_pipeline': Could not setup dependencies: conversation
Oct 03 08:15:18 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:18.090 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'esphome'. Setup failed for dependencies: ['assist_pipeline']
Oct 03 08:15:18 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:18.091 ERROR (MainThread) [homeassistant.setup] Setup failed for 'esphome': Could not setup dependencies: assist_pipeline
Oct 03 08:15:18 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:18.168 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package numpy==1.26.4: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:20 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:20.874 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package numpy==1.26.4: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:23 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:23.725 ERROR (SyncWorker_5) [homeassistant.util.package] Unable to install package numpy==1.26.4: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:23 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:23.728 ERROR (MainThread) [homeassistant.setup] Setup failed for 'stream': Requirements for stream not found: ['numpy==1.26.4'].
Oct 03 08:15:23 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:23.729 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'default_config'. Setup failed for dependencies: ['assist_pipeline', 'cloud', 'conversation', 'dhcp', 'logbook', 'map', 'mobile_app', 'my', 'stream', 'zeroconf']
Oct 03 08:15:23 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:23.730 ERROR (MainThread) [homeassistant.setup] Setup failed for 'default_config': Could not setup dependencies: assist_pipeline, cloud, conversation, dhcp, logbook, map, mobile_app, my, stream, zeroconf
Oct 03 08:15:26 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:26.623 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package reolink-aio==0.9.11: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:29 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:29.475 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package reolink-aio==0.9.11: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:32 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:32.282 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package reolink-aio==0.9.11: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:32 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:32.285 ERROR (MainThread) [homeassistant.setup] Setup failed for 'reolink': Requirements for reolink not found: ['reolink-aio==0.9.11'].
Oct 03 08:15:32 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:32.287 WARNING (MainThread) [homeassistant.bootstrap] Detected that frontend did not load. Activating recovery mode
Oct 03 08:15:35 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:35.624 ERROR (SyncWorker_9) [homeassistant.util.package] Unable to install package home-assistant-frontend==20241002.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:38 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:38.432 ERROR (SyncWorker_9) [homeassistant.util.package] Unable to install package home-assistant-frontend==20241002.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:41 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:41.259 ERROR (SyncWorker_9) [homeassistant.util.package] Unable to install package home-assistant-frontend==20241002.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:41 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:41.262 ERROR (MainThread) [homeassistant.setup] Setup failed for 'frontend': Requirements for frontend not found: ['home-assistant-frontend==20241002.2'].
Oct 03 08:15:44 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:44.102 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package home-assistant-intents==2024.10.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:46 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:46.934 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package home-assistant-intents==2024.10.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:49 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:49.745 ERROR (SyncWorker_2) [homeassistant.util.package] Unable to install package home-assistant-intents==2024.10.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:52 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:52.598 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package python-matter-server==6.5.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:55 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:55.489 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package python-matter-server==6.5.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:58 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:58.314 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package python-matter-server==6.5.2: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 08:15:58 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:58.317 ERROR (MainThread) [homeassistant.setup] Setup failed for 'cloud': Requirements for matter not found: ['python-matter-server==6.5.2'].
Oct 03 08:15:58 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:58.319 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of 'recovery_mode'. Setup failed for dependencies: ['frontend', 'cloud']
Oct 03 08:15:58 HomeNetDNS Home Assistant[1936]: 2024-10-03 08:15:58.320 ERROR (MainThread) [homeassistant.setup] Setup failed for 'recovery_mode': Could not setup dependencies: frontend, cloud

whyisthisbroken avatar Oct 03 '24 06:10 whyisthisbroken

I have a very similar or identical issue, but I don't have as many modules failing. I even tried purging the whole installation and starting fresh, but still get the errors. I submitted a BugReport via the dietpi-bugreport feature, and am including some logs here to help with this.

───────────────────────────────────────────────────── DietPi v9.7.1 : 11:00 - Thu 10/03/24 ─────────────────────────────────────────────────────

  • Device model : RPi 3 Model B (aarch64)
  • CPU temp : 59 °C / 138 °F : Running warm, but safe
  • RAM usage : 282 of 960 MiB (29%)
  • Load average : 0.21, 0.24, 0.63 (4 cores)
Oct 03 10:51:34 pi3 Home Assistant[18272]: 2024-10-03 10:51:34.594 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tapo_control which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Oct 03 10:51:34 pi3 Home Assistant[18272]: 2024-10-03 10:51:34.598 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration midea_ac_lan which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Oct 03 10:51:34 pi3 Home Assistant[18272]: 2024-10-03 10:51:34.601 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tapo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Oct 03 10:51:34 pi3 Home Assistant[18272]: 2024-10-03 10:51:34.604 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Oct 03 10:51:41 pi3 Home Assistant[18272]: 2024-10-03 10:51:41.803 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:51:46 pi3 Home Assistant[18272]: 2024-10-03 10:51:46.791 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:51:51 pi3 Home Assistant[18272]: 2024-10-03 10:51:51.732 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:51:56 pi3 Home Assistant[18272]: 2024-10-03 10:51:56.662 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:01 pi3 Home Assistant[18272]: 2024-10-03 10:52:01.600 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:06 pi3 Home Assistant[18272]: 2024-10-03 10:52:06.555 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:06 pi3 Home Assistant[18272]: 2024-10-03 10:52:06.557 ERROR (MainThread) [homeassistant.bootstrap] Home Assistant core failed to initialize. Further initialization aborted
Oct 03 10:52:06 pi3 Home Assistant[18272]: 2024-10-03 10:52:06.558 WARNING (MainThread) [homeassistant.bootstrap] Unable to set up core integrations. Activating recovery mode
Oct 03 10:52:11 pi3 Home Assistant[18272]: 2024-10-03 10:52:11.667 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:16 pi3 Home Assistant[18272]: 2024-10-03 10:52:16.646 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:21 pi3 Home Assistant[18272]: 2024-10-03 10:52:21.652 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package pyotp==2.8.0: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:26 pi3 Home Assistant[18272]: 2024-10-03 10:52:26.677 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:31 pi3 Home Assistant[18272]: 2024-10-03 10:52:31.687 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:36 pi3 Home Assistant[18272]: 2024-10-03 10:52:36.751 ERROR (SyncWorker_6) [homeassistant.util.package] Unable to install package PyQRCode==1.2.1: error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
Oct 03 10:52:36 pi3 Home Assistant[18272]: 2024-10-03 10:52:36.753 ERROR (MainThread) [homeassistant.bootstrap] Home Assistant core failed to initialize. Further initialization aborted

mostlyvirtual avatar Oct 03 '24 07:10 mostlyvirtual

I've solved my issue logging in as root and installing uv, creating a new venv with uv venv and finally editing all the files in /home/homeassistant:

  • homeassistant-start.sh: changing the first line from dash to bash
  • homeassistant-update.sh:
#!/bin/bash
exec sudo -u homeassistant bash -c '. /home/homeassistant/pyenv-activate.sh; exec uv pip install -U homeassistant'
  • pyenv-activate.sh:
#!/bin/bash
if [ $(whoami) != 'homeassistant' ]; then
        echo '[FAILED] This pyenv must be activated as user "homeassistant". Aborting...'
        kill -INT $$
fi
cd /home/homeassistant
export PYENV_ROOT='/home/homeassistant/.venv'
export PATH="$PYENV_ROOT/bin:$PATH"
source .venv/bin/activate
[ -f '.cargo/env' ] && . .cargo/env

domenicoblanco avatar Oct 03 '24 15:10 domenicoblanco

Looks like one needs to pass --system now if it is installed without virtual environment (it is, as we use pyenv, but that one is is not detected as such, obviously).

MichaIng avatar Oct 03 '24 16:10 MichaIng

is adding --system a quick fix till there is a patch? if so where should it be added to? or is the @domenicoblanco method the quick fix? Thanks for being fast to response.

InnovoDeveloper avatar Oct 03 '24 17:10 InnovoDeveloper

What's the consensus on an official fix then?

Mine has the same issue..

image

Dynamic5912 avatar Oct 03 '24 17:10 Dynamic5912

The problem is --system would need to be added to the uv call itself, which is in HA code. An alternative is to export VIRTUAL_ENV, but it seems along the pyenv > hass > uv calls, the environment is lost, or at least this variable, so it does not work either.

A bigger problem might be that this way, also the Rust environment would be lost, potentially breaking installs on 32-bit ARM and RISC-V systems.

@domenicoblanco method means a completely different Python instance environment, not using pyenv at all, but the system Python instance, which also does not work on Bullseye, and will break future HA versions on current Debian, as fast as HA drops older Python support. So this is not a solution we can consider. If at all, we would create a true virtualenv within pyenv, but I would like to avoid that double-env wrapping, which is nonsense here, as this pyenv instance is exclusive for HA already.

MichaIng avatar Oct 03 '24 17:10 MichaIng

looks like restore is your uncle here till there is a perm fix :)

InnovoDeveloper avatar Oct 03 '24 17:10 InnovoDeveloper

Hmm, the VIRTUAL_ENV variable is passed through, but it does not seem to be respected as described here:

  • https://github.com/astral-sh/uv/issues/1374
  • https://github.com/astral-sh/uv/blob/main/docs/pip/environments.md

As if the directory would not complain PIP 405: https://peps.python.org/pep-0405/#specification But it is a complete common Python environment 🤔.

MichaIng avatar Oct 03 '24 17:10 MichaIng

Hmm

homeassistant@VM-Bookworm:~$ echo $VIRTUAL_ENV
/mnt/dietpi_userdata/homeassistant/deps
homeassistant@VM-Bookworm:~$ uv pip install pyotp==2.8.0
error: No virtual environment found; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environment
homeassistant@VM-Bookworm:~$ uv pip install --system pyotp==2.8.0
Resolved 1 package in 141ms
Prepared 1 package in 25ms
Installed 1 package in 1ms
 + pyotp==2.8.0
homeassistant@VM-Bookworm:~$

HA passes --target /mnt/dietpi_userdata/homeassistant/deps, which results in the same error, despite VIRTUAL_ENV passed. Need to check back with uv devs, how it evaluates whether it is a virtual env or not.

MichaIng avatar Oct 03 '24 18:10 MichaIng

looks like restore is your uncle here till there is a perm fix :)

How do you roll it back to a previous version?

And does this actually fix it?

Dynamic5912 avatar Oct 03 '24 18:10 Dynamic5912

looks like restore is your uncle here till there is a perm fix :)

How do you roll it back to a previous version?

And does this actually fix it?

To downgrade you can do:

sudo -u homeassistant bash
. /home/homeassistant/pyenv-activate.sh
pip3 install homeassistant==2024.9.3

I did it on my instances and works fine.

Yougoshatenshi avatar Oct 03 '24 18:10 Yougoshatenshi

Thanks @Yougoshatenshi this is exactly what I would have suggested for now :)

MichaIng avatar Oct 03 '24 18:10 MichaIng

Downgrading worked a treat - thanks!

Just have to resist the urge to update again now... 😁

Dynamic5912 avatar Oct 03 '24 18:10 Dynamic5912

I am getting No matching distribution found for homeassistant==2024.9.3 when I try to roll it back. What am I missing ?

InnovoDeveloper avatar Oct 03 '24 19:10 InnovoDeveloper

I am getting

No matching distribution found for homeassistant==2024.9.3

when I try to roll it back. What am I missing ?

Are you running the other commands as well?

Dynamic5912 avatar Oct 03 '24 19:10 Dynamic5912

Let's see whether there is a different solution than adding an actual pyenv virtuelenv: https://github.com/astral-sh/uv/issues/7907

MichaIng avatar Oct 03 '24 19:10 MichaIng

I am getting No matching distribution found for homeassistant==2024.9.3 when I try to roll it back. What am I missing ?

Are you running the other commands as well?

yes, I am first running sudo -u homeassistant bash . /home/homeassistant/pyenv-activate.sh

InnovoDeveloper avatar Oct 03 '24 19:10 InnovoDeveloper

@InnovoDeveloper Which SBC and architecture do you use?

echo $G_HW_MODEL_NAME $G_HW_ARCH_NAME $G_DISTRO_NAME

MichaIng avatar Oct 03 '24 19:10 MichaIng

NanoPi R5S/R5C (aarch64) aarch64 bookworm

@InnovoDeveloper Which SBC and architecture do you use?

echo $G_HW_MODEL_NAME $G_HW_ARCH_NAME $G_DISTRO_NAME

NanoPi R5S/R5C (aarch64) aarch64 bookworm

InnovoDeveloper avatar Oct 03 '24 19:10 InnovoDeveloper

I am getting the following error, so this could be due to a different python version that I am running.
python3 --version returns 3.11.2 I did dietpi-software reinstall 130 but that still gives me the same version.

Defaulting to user installation because normal site-packages is not writeable
ERROR: Ignored the following versions that require a different python version: 2024.10.0 Requires-Python >=3.12.0; 2024.10.0b0 Requires-Python >=3.12.0; 2024.10.0b1 Requires-Python >=3.12.0; 2024.10.0b10 Requires-Python >=3.12.0; 2024.10.0b11 Requires-Python >=3.12.0; 2024.10.0b12 Requires-Python >=3.12.0; 2024.10.0b2 Requires-Python >=3.12.0; 2024.10.0b3 Requires-Python >=3.12.0; 2024.10.0b4 Requires-Python >=3.12.0; 2024.10.0b5 Requires-Python >=3.12.0; 2024.10.0b6 Requires-Python >=3.12.0; 2024.10.0b7 Requires-Python >=3.12.0; 2024.10.0b8 Requires-Python >=3.12.0; 2024.10.0b9 Requires-Python >=3.12.0; 2024.4.0 Requires-Python >=3.12.0; 2024.4.0b0 Requires-Python >=3.12.0; 2024.4.0b1 Requires-Python >=3.12.0; 2024.4.0b2 Requires-Python >=3.12.0; 2024.4.0b3 Requires-Python >=3.12.0; 2024.4.0b4 Requires-Python >=3.12.0; 2024.4.0b5 Requires-Python >=3.12.0; 2024.4.0b6 Requires-Python >=3.12.0; 2024.4.0b7 Requires-Python >=3.12.0; 2024.4.0b8 Requires-Python >=3.12.0; 2024.4.0b9 Requires-Python >=3.12.0; 2024.4.1 Requires-Python >=3.12.0; 2024.4.2 Requires-Python >=3.12.0; 2024.4.3 Requires-Python >=3.12.0; 2024.4.4 Requires-Python >=3.12.0; 2024.5.0 Requires-Python >=3.12.0; 2024.5.0b0 Requires-Python >=3.12.0; 2024.5.0b1 Requires-Python >=3.12.0; 2024.5.0b2 Requires-Python >=3.12.0; 2024.5.0b3 Requires-Python >=3.12.0; 2024.5.0b4 Requires-Python >=3.12.0; 2024.5.0b5 Requires-Python >=3.12.0; 2024.5.0b6 Requires-Python >=3.12.0; 2024.5.0b7 Requires-Python >=3.12.0; 2024.5.1 Requires-Python >=3.12.0; 2024.5.2 Requires-Python >=3.12.0; 2024.5.3 Requires-Python >=3.12.0; 2024.5.4 Requires-Python >=3.12.0; 2024.5.5 Requires-Python >=3.12.0; 2024.6.0 Requires-Python >=3.12.0; 2024.6.0b0 Requires-Python >=3.12.0; 2024.6.0b1 Requires-Python >=3.12.0; 2024.6.0b2 Requires-Python >=3.12.0; 2024.6.0b3 Requires-Python >=3.12.0; 2024.6.0b4 Requires-Python >=3.12.0; 2024.6.0b5 Requires-Python >=3.12.0; 2024.6.0b6 Requires-Python >=3.12.0; 2024.6.0b7 Requires-Python >=3.12.0; 2024.6.0b8 Requires-Python >=3.12.0; 2024.6.0b9 Requires-Python >=3.12.0; 2024.6.1 Requires-Python >=3.12.0; 2024.6.2 Requires-Python >=3.12.0; 2024.6.3 Requires-Python >=3.12.0; 2024.6.4 Requires-Python >=3.12.0; 2024.7.0 Requires-Python >=3.12.0; 2024.7.0b0 Requires-Python >=3.12.0; 2024.7.0b1 Requires-Python >=3.12.0; 2024.7.0b10 Requires-Python >=3.12.0; 2024.7.0b11 Requires-Python >=3.12.0; 2024.7.0b2 Requires-Python >=3.12.0; 2024.7.0b3 Requires-Python >=3.12.0; 2024.7.0b4 Requires-Python >=3.12.0; 2024.7.0b5 Requires-Python >=3.12.0; 2024.7.0b6 Requires-Python >=3.12.0; 2024.7.0b7 Requires-Python >=3.12.0; 2024.7.0b8 Requires-Python >=3.12.0; 2024.7.0b9 Requires-Python >=3.12.0; 2024.7.1 Requires-Python >=3.12.0; 2024.7.2 Requires-Python >=3.12.0; 2024.7.3 Requires-Python >=3.12.0; 2024.7.4 Requires-Python >=3.12.0; 2024.8.0 Requires-Python >=3.12.0; 2024.8.0b0 Requires-Python >=3.12.0; 2024.8.0b1 Requires-Python >=3.12.0; 2024.8.0b2 Requires-Python >=3.12.0; 2024.8.0b3 Requires-Python >=3.12.0; 2024.8.0b4 Requires-Python >=3.12.0; 2024.8.0b5 Requires-Python >=3.12.0; 2024.8.0b6 Requires-Python >=3.12.0; 2024.8.0b7 Requires-Python >=3.12.0; 2024.8.0b8 Requires-Python >=3.12.0; 2024.8.0b9 Requires-Python >=3.12.0; 2024.8.1 Requires-Python >=3.12.0; 2024.8.2 Requires-Python >=3.12.0; 2024.8.3 Requires-Python >=3.12.0; 2024.9.0 Requires-Python >=3.12.0; 2024.9.0b0 Requires-Python >=3.12.0; 2024.9.0b1 Requires-Python >=3.12.0; 2024.9.0b2 Requires-Python >=3.12.0; 2024.9.0b3 Requires-Python >=3.12.0; 2024.9.0b4 Requires-Python >=3.12.0; 2024.9.0b5 Requires-Python >=3.12.0; 2024.9.1 Requires-Python >=3.12.0; 2024.9.2 Requires-Python >=3.12.0; 2024.9.3 Requires-Python >=3.12.0
ERROR: Could not find a version that satisfies the requirement homeassistant==2024.9.3 (from versions: 0.7.0rc1, 0.7.0, 0.7.0.1, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.8.0, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.11.1, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.15.0, 0.16.0, 0.16.1, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.18.2, 0.19, 0.19.1, 0.19.2, 0.19.3, 0.19.4, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.21.2, 0.22.0, 0.22.1, 0.23.0, 0.23.1, 0.24.0, 0.24.1, 0.25.0, 0.25.1, 0.25.2, 0.26.0, 0.26.1, 0.26.2, 0.26.3, 0.27.0, 0.27.1, 0.27.2, 0.28.0, 0.28.1, 0.28.2, 0.29.0, 0.29.1, 0.29.2, 0.29.3, 0.29.4, 0.29.5, 0.29.6, 0.29.7, 0.30.0, 0.30.1, 0.30.2, 0.31.0, 0.31.1, 0.32.0, 0.32.1, 0.32.2, 0.32.3, 0.32.4, 0.33.0, 0.33.1, 0.33.2, 0.33.3, 0.33.4, 0.34.0, 0.34.1, 0.34.2, 0.34.3, 0.34.4, 0.34.5, 0.35.0, 0.35.1, 0.35.2, 0.35.3, 0.36.0, 0.36.1, 0.37.0, 0.37.1, 0.38.0, 0.38.1, 0.38.2, 0.38.3, 0.38.4, 0.39.0, 0.39.1, 0.39.2, 0.39.3, 0.40.0, 0.40.1, 0.40.2, 0.41.0, 0.42.0, 0.42.1, 0.42.2, 0.42.3, 0.42.4, 0.43.0, 0.43.1, 0.43.2, 0.44.0, 0.44.1, 0.45.0, 0.45.1, 0.46.0, 0.46.1, 0.47.0, 0.47.1, 0.48.0, 0.48.1, 0.49.0, 0.49.1, 0.50.1, 0.50.2, 0.51.0, 0.51.1, 0.51.2, 0.52.0, 0.52.1, 0.53.0, 0.53.1, 0.54.0, 0.55.0, 0.55.1, 0.56.0, 0.56.1, 0.56.2, 0.57.0, 0.57.1, 0.57.2, 0.57.3, 0.58.0, 0.58.1, 0.59.0, 0.59.1, 0.59.2, 0.60.0, 0.60.1, 0.61.0, 0.61.1, 0.62.0, 0.62.1, 0.63.0, 0.63.1, 0.63.2, 0.63.3, 0.64.0, 0.64.1, 0.64.2, 0.64.3, 0.64.4b0, 0.65.0, 0.65.1, 0.65.2, 0.65.3, 0.65.4, 0.65.5, 0.65.6, 0.66.0b0, 0.66.0b1, 0.66.0b2, 0.66.0b3, 0.66.0, 0.66.1b0, 0.66.1, 0.67.0b0, 0.67.0b1, 0.67.0, 0.67.1, 0.68.0b0, 0.68.0b1, 0.68.0b2, 0.68.0, 0.68.1, 0.69.0b0, 0.69.0, 0.69.1, 0.70.0b0, 0.70.0b1, 0.70.0b2, 0.70.0b3, 0.70.0b4, 0.70.0b5, 0.70.0b6, 0.70.0b7, 0.70.0, 0.70.1, 0.71.0b0, 0.71.0, 0.72.0b0, 0.72.0b1, 0.72.0b2, 0.72.0b4, 0.72.0b5, 0.72.0b6, 0.72.0b7, 0.72.0b8, 0.72.0b9, 0.72.0, 0.72.1, 0.73.0b0, 0.73.0b1, 0.73.0b2, 0.73.0b3, 0.73.0b4, 0.73.0b5, 0.73.0b6, 0.73.0, 0.73.1, 0.73.2, 0.74.0b0, 0.74.0b2, 0.74.0b3, 0.74.0b4, 0.74.0, 0.74.1, 0.74.2, 0.75.0b0, 0.75.0b1, 0.75.0, 0.75.1, 0.75.2, 0.75.3, 0.76.0b0, 0.76.0b1, 0.76.0b2, 0.76.0b3, 0.76.0b4, 0.76.0b5, 0.76.0, 0.76.1, 0.76.2, 0.77.0b0, 0.77.0b1, 0.77.0b2, 0.77.0b3, 0.77.0b4, 0.77.0, 0.77.1, 0.77.2, 0.77.3, 0.78.0b0, 0.78.0b1, 0.78.0b2, 0.78.0b3, 0.78.0, 0.78.1, 0.78.2, 0.78.3, 0.79.0b0, 0.79.0b1, 0.79.0b2, 0.79.0b3, 0.79.0, 0.79.1, 0.79.2, 0.79.3, 0.80.0b0, 0.80.0b1, 0.80.0b2, 0.80.0b3, 0.80.0b4, 0.80.0b5, 0.80.0, 0.80.1, 0.80.2, 0.80.3, 0.81.0b0, 0.81.0b1, 0.81.0b2, 0.81.0, 0.81.1, 0.81.2, 0.81.3, 0.81.4, 0.81.5, 0.81.6, 0.82.0b0, 0.82.0b1, 0.82.0b2, 0.82.0b3, 0.82.0b4, 0.82.0, 0.82.1, 0.83.0b0, 0.83.0b1, 0.83.0b3, 0.83.0, 0.83.1, 0.83.2, 0.83.3, 0.84.0b0, 0.84.0b1, 0.84.0b2, 0.84.0b3, 0.84.0b4, 0.84.0, 0.84.1, 0.84.2, 0.84.3, 0.84.4, 0.84.5, 0.84.6, 0.85.0b0, 0.85.0b1, 0.85.0, 0.85.1, 0.86.0b0, 0.86.0b1, 0.86.0b2, 0.86.0b3, 0.86.0, 0.86.1, 0.86.2, 0.86.3, 0.86.4, 0.87.0b0, 0.87.0b1, 0.87.0b2, 0.87.0b3, 0.87.0b4, 0.87.0b5, 0.87.0b6, 0.87.0, 0.87.1, 0.88.0b0, 0.88.0b1, 0.88.0b2, 0.88.0b3, 0.88.0b4, 0.88.0, 0.88.1, 0.88.2, 0.89.0b0, 0.89.0b1, 0.89.0b2, 0.89.0b3, 0.89.0, 0.89.1, 0.89.2, 0.90.0b0, 0.90.0b1, 0.90.0b2, 0.90.0b3, 0.90.0b4, 0.90.0b5, 0.90.0b6, 0.90.0b7, 0.90.0, 0.90.1, 0.90.2, 0.91.0b0, 0.91.0b1, 0.91.0b2, 0.91.0b3, 0.91.0b4, 0.91.0b5, 0.91.0, 0.91.1, 0.91.2, 0.91.3, 0.91.4, 0.92.0b0, 0.92.0b1, 0.92.0b2, 0.92.0b3, 0.92.0, 0.92.1, 0.92.2, 0.93.0b0, 0.93.0b1, 0.93.0b2, 0.93.0b4, 0.93.0, 0.93.1, 0.93.2, 0.94.0b0, 0.94.0b1, 0.94.0b2, 0.94.0b3, 0.94.0b4, 0.94.0b5, 0.94.0b6, 0.94.0b7, 0.94.0b8, 0.94.0, 0.94.1, 0.94.2, 0.94.3, 0.94.4, 0.95.0b0, 0.95.0b1, 0.95.0b2, 0.95.0b3, 0.95.0b4, 0.95.0, 0.95.1, 0.95.2, 0.95.3, 0.95.4, 0.96.0b0, 0.96.0b1, 0.96.0b2, 0.96.0b3, 0.96.0b4, 0.96.0, 0.96.1, 0.96.2, 0.96.3, 0.96.4, 0.96.5, 0.97.0b0, 0.97.0b1, 0.97.0b2, 0.97.0b3, 0.97.0, 0.97.1, 0.97.2, 0.98.0b0, 0.98.0b1, 0.98.0b2, 0.98.0, 0.98.1, 0.98.2, 0.98.3, 0.98.4, 0.98.5, 0.99.0b0, 0.99.0b1, 0.99.0b2, 0.99.0b3, 0.99.0b4, 0.99.0, 0.99.1, 0.99.2, 0.99.3, 0.100.0b0, 0.100.0b1, 0.100.0b2, 0.100.0b3, 0.100.0, 0.100.1, 0.100.2, 0.100.3, 0.101.0b0, 0.101.0b1, 0.101.0b2, 0.101.0b3, 0.101.0b4, 0.101.0, 0.101.1, 0.101.2, 0.101.3, 0.102.0b0, 0.102.0b1, 0.102.0b2, 0.102.0b3, 0.102.0, 0.102.1, 0.102.2, 0.102.3, 0.103.0b0, 0.103.0b1, 0.103.0, 0.103.1, 0.103.2, 0.103.3, 0.103.4, 0.103.5, 0.103.6, 0.104.0b0, 0.104.0b1, 0.104.0b2, 0.104.0b3, 0.104.0b4, 0.104.0b5, 0.104.0, 0.104.1, 0.104.2, 0.104.3, 0.105.0b0, 0.105.0b5, 0.105.0b6, 0.105.0b7, 0.105.0, 0.105.1, 0.105.2, 0.105.3, 0.105.4, 0.105.5, 0.106.0b0, 0.106.0b5, 0.106.0, 0.106.1, 0.106.2, 0.106.3, 0.106.4, 0.106.5, 0.106.6, 0.107.0b0, 0.107.0b1, 0.107.0b2, 0.107.0b3, 0.107.0b4, 0.107.0b5, 0.107.0b8, 0.107.0, 0.107.1, 0.107.2, 0.107.3, 0.107.4, 0.107.5, 0.107.6, 0.107.7, 0.108.0b0, 0.108.0b1, 0.108.0b2, 0.108.0b3, 0.108.0b4, 0.108.0b5, 0.108.0b6, 0.108.0, 0.108.1, 0.108.2, 0.108.3, 0.108.4, 0.108.5, 0.108.6, 0.108.7, 0.108.8, 0.108.9, 0.109.0b0, 0.109.0b4, 0.109.0b5, 0.109.0, 0.109.1, 0.109.2, 0.109.3, 0.109.4, 0.109.5, 0.109.6, 0.110.0b0, 0.110.0b1, 0.110.0b2, 0.110.0b3, 0.110.0b4, 0.110.0b5, 0.110.0, 0.110.1, 0.110.2, 0.110.3, 0.110.4, 0.110.5, 0.110.6, 0.110.7, 0.111.0b0, 0.111.0b1, 0.111.0b2, 0.111.0b3, 0.111.0b4, 0.111.0b5, 0.111.0, 0.111.1, 0.111.2, 0.111.3, 0.111.4, 0.112.0b0, 0.112.0b1, 0.112.0b2, 0.112.0b3, 0.112.0b4, 0.112.0, 0.112.1, 0.112.2, 0.112.3, 0.112.4, 0.112.5, 0.113.0b0, 0.113.0b1, 0.113.0b2, 0.113.0b3, 0.113.0, 0.113.1, 0.113.2, 0.113.3, 0.114.0b0, 0.114.0b1, 0.114.0b2, 0.114.0b3, 0.114.0b4, 0.114.0, 0.114.1, 0.114.2, 0.114.3, 0.114.4, 0.115.0b0, 0.115.0b1, 0.115.0b2, 0.115.0b3, 0.115.0b4, 0.115.0b5, 0.115.0b6, 0.115.0b7, 0.115.0b8, 0.115.0b9, 0.115.0b10, 0.115.0b11, 0.115.0b12, 0.115.0, 0.115.1, 0.115.2, 0.115.3, 0.115.4, 0.115.5, 0.115.6, 0.116.0b0, 0.116.0b1, 0.116.0b2, 0.116.0b3, 0.116.0b4, 0.116.0b5, 0.116.0, 0.116.1, 0.116.2, 0.116.3, 0.116.4, 0.117.0b0, 0.117.0b1, 0.117.0b2, 0.117.0b3, 0.117.0b4, 0.117.0b5, 0.117.0b6, 0.117.0, 0.117.1, 0.117.2, 0.117.3, 0.117.4, 0.117.5, 0.117.6, 0.118.0b0, 0.118.0b1, 0.118.0b2, 0.118.0b3, 0.118.0, 0.118.1, 0.118.2, 0.118.3, 0.118.4, 0.118.5, 1.0.0b0, 1.0.0b1, 1.0.0b2, 1.0.0b3, 1.0.0b4, 1.0.0b5, 1.0.0b6, 2020.12.0, 2020.12.1, 2020.12.2, 2021.1.0b0, 2021.1.0b1, 2021.1.0b2, 2021.1.0b3, 2021.1.0, 2021.1.1, 2021.1.2, 2021.1.3, 2021.1.4, 2021.1.5, 2021.2.0b0, 2021.2.0b1, 2021.2.0b2, 2021.2.0b3, 2021.2.0b4, 2021.2.0b5, 2021.2.0, 2021.2.1, 2021.2.2, 2021.2.3, 2021.3.0b0, 2021.3.0b1, 2021.3.0b2, 2021.3.0b3, 2021.3.0b4, 2021.3.0b5, 2021.3.0b6, 2021.3.0b7, 2021.3.0, 2021.3.1, 2021.3.2, 2021.3.3, 2021.3.4, 2021.4.0b0, 2021.4.0b1, 2021.4.0b2, 2021.4.0b3, 2021.4.0b4, 2021.4.0b5, 2021.4.0b6, 2021.4.0, 2021.4.1, 2021.4.2, 2021.4.3, 2021.4.4, 2021.4.5, 2021.4.6, 2021.5.0b0, 2021.5.0b1, 2021.5.0b2, 2021.5.0b3, 2021.5.0b4, 2021.5.0b5, 2021.5.0b6, 2021.5.0b7, 2021.5.0b8, 2021.5.0, 2021.5.1, 2021.5.2, 2021.5.3, 2021.5.4, 2021.5.5, 2021.6.0b0, 2021.6.0b1, 2021.6.0b2, 2021.6.0b3, 2021.6.0b4, 2021.6.0b5, 2021.6.0, 2021.6.1, 2021.6.2, 2021.6.3, 2021.6.4, 2021.6.5, 2021.6.6, 2021.7.0b0, 2021.7.0b1, 2021.7.0b2, 2021.7.0b3, 2021.7.0b4, 2021.7.0b5, 2021.7.0b6, 2021.7.0, 2021.7.1, 2021.7.2, 2021.7.3, 2021.7.4, 2021.8.0b0, 2021.8.0b1, 2021.8.0b2, 2021.8.0b3, 2021.8.0b4, 2021.8.0b5, 2021.8.0b6, 2021.8.0b7, 2021.8.0b8, 2021.8.0b9, 2021.8.0b10, 2021.8.0, 2021.8.1, 2021.8.2, 2021.8.3, 2021.8.4, 2021.8.5, 2021.8.6, 2021.8.7, 2021.8.8, 2021.9.0b0, 2021.9.0b1, 2021.9.0b2, 2021.9.0b3, 2021.9.0b4, 2021.9.0b5, 2021.9.0b6, 2021.9.0b7, 2021.9.0, 2021.9.1, 2021.9.2, 2021.9.3, 2021.9.4, 2021.9.5, 2021.9.6, 2021.9.7, 2021.10.0b0, 2021.10.0b1, 2021.10.0b2, 2021.10.0b3, 2021.10.0b4, 2021.10.0b5, 2021.10.0b6, 2021.10.0b7, 2021.10.0b9, 2021.10.0, 2021.10.1, 2021.10.2, 2021.10.3, 2021.10.4, 2021.10.5, 2021.10.6, 2021.10.7, 2021.11.0b0, 2021.11.0b1, 2021.11.0b2, 2021.11.0b3, 2021.11.0b4, 2021.11.0b5, 2021.11.0, 2021.11.1, 2021.11.2, 2021.11.3, 2021.11.4, 2021.11.5, 2021.12.0b0, 2021.12.0b1, 2021.12.0b2, 2021.12.0b3, 2021.12.0b4, 2021.12.0b5, 2021.12.0b6, 2021.12.0b7, 2021.12.0, 2021.12.1, 2021.12.2, 2021.12.3, 2021.12.4, 2021.12.5, 2021.12.6, 2021.12.7, 2021.12.8, 2021.12.9, 2021.12.10, 2022.2.0b0, 2022.2.0b1, 2022.2.0b2, 2022.2.0b3, 2022.2.0b4, 2022.2.0b5, 2022.2.0b6, 2022.2.0, 2022.2.1, 2022.2.2, 2022.2.3, 2022.2.4, 2022.2.5, 2022.2.6, 2022.2.7, 2022.2.8, 2022.2.9, 2022.3.0b0, 2022.3.0b1, 2022.3.0b2, 2022.3.0b3, 2022.3.0b4, 2022.3.0b5, 2022.3.0b6, 2022.3.0, 2022.3.1, 2022.3.2, 2022.3.3, 2022.3.4, 2022.3.5, 2022.3.6, 2022.3.7, 2022.3.8, 2022.4.0b0, 2022.4.0b1, 2022.4.0b2, 2022.4.0b3, 2022.4.0b4, 2022.4.0b5, 2022.4.0, 2022.4.1, 2022.4.2, 2022.4.3, 2022.4.4, 2022.4.5, 2022.4.6, 2022.4.7, 2022.5.0b0, 2022.5.0b1, 2022.5.0b2, 2022.5.0b3, 2022.5.0b4, 2022.5.0b5, 2022.5.0b6, 2022.5.0b7, 2022.5.0, 2022.5.1, 2022.5.2, 2022.5.3, 2022.5.4, 2022.5.5, 2022.6.0b0, 2022.6.0b1, 2022.6.0b2, 2022.6.0b3, 2022.6.0b4, 2022.6.0b5, 2022.6.0b6, 2022.6.0b7, 2022.6.0, 2022.6.1, 2022.6.2, 2022.6.3, 2022.6.4, 2022.6.5, 2022.6.6, 2022.6.7, 2022.7.0b0, 2022.7.0b1, 2022.7.0b2, 2022.7.0b3, 2022.7.0b4, 2022.7.0b5, 2022.7.0, 2022.7.1, 2022.7.2, 2022.7.3, 2022.7.4, 2022.7.5, 2022.7.6, 2022.7.7, 2022.8.0b0, 2022.8.0b1, 2022.8.0b2, 2022.8.0b3, 2022.8.0b4, 2022.8.0b5, 2022.8.0b6, 2022.8.0b7, 2022.8.0, 2022.8.1, 2022.8.2, 2022.8.3, 2022.8.4, 2022.8.5, 2022.8.6, 2022.8.7, 2022.9.0b0, 2022.9.0b1, 2022.9.0b2, 2022.9.0b3, 2022.9.0b4, 2022.9.0b5, 2022.9.0b6, 2022.9.0, 2022.9.1, 2022.9.2, 2022.9.3, 2022.9.4, 2022.9.5, 2022.9.6, 2022.9.7, 2022.10.0b0, 2022.10.0b1, 2022.10.0b2, 2022.10.0b3, 2022.10.0b4, 2022.10.0b5, 2022.10.0b6, 2022.10.0, 2022.10.1, 2022.10.2, 2022.10.3, 2022.10.4, 2022.10.5, 2022.11.0b0, 2022.11.0b1, 2022.11.0b2, 2022.11.0b3, 2022.11.0b4, 2022.11.0b5, 2022.11.0b6, 2022.11.0b7, 2022.11.0, 2022.11.1, 2022.11.2, 2022.11.3, 2022.11.4, 2022.11.5, 2022.12.0b0, 2022.12.0b1, 2022.12.0b2, 2022.12.0b3, 2022.12.0b4, 2022.12.0b5, 2022.12.0b6, 2022.12.0b7, 2022.12.0, 2022.12.1, 2022.12.2, 2022.12.3, 2022.12.4, 2022.12.5, 2022.12.6, 2022.12.7, 2022.12.8, 2022.12.9, 2023.1.0b0, 2023.1.0b1, 2023.1.0b2, 2023.1.0b3, 2023.1.0b4, 2023.1.0b5, 2023.1.0, 2023.1.1, 2023.1.2, 2023.1.3, 2023.1.4, 2023.1.5, 2023.1.6, 2023.1.7, 2023.2.0b0, 2023.2.0b1, 2023.2.0b2, 2023.2.0b3, 2023.2.0b4, 2023.2.0b5, 2023.2.0b6, 2023.2.0b7, 2023.2.0b8, 2023.2.0b9, 2023.2.0, 2023.2.1, 2023.2.2, 2023.2.3, 2023.2.4, 2023.2.5, 2023.3.0b0, 2023.3.0b1, 2023.3.0b2, 2023.3.0b3, 2023.3.0b4, 2023.3.0b5, 2023.3.0b6, 2023.3.0b7, 2023.3.0, 2023.3.1, 2023.3.2, 2023.3.3, 2023.3.4, 2023.3.5, 2023.3.6, 2023.4.0b0, 2023.4.0b1, 2023.4.0b2, 2023.4.0b3, 2023.4.0b4, 2023.4.0b5, 2023.4.0b6, 2023.4.0b7, 2023.4.0, 2023.4.1, 2023.4.2, 2023.4.3, 2023.4.4, 2023.4.5, 2023.4.6, 2023.5.0b0, 2023.5.0b1, 2023.5.0b2, 2023.5.0b3, 2023.5.0b4, 2023.5.0b5, 2023.5.0b6, 2023.5.0b7, 2023.5.0b8, 2023.5.0, 2023.5.1, 2023.5.2, 2023.5.3, 2023.5.4, 2023.6.0b0, 2023.6.0b1, 2023.6.0b2, 2023.6.0b3, 2023.6.0b4, 2023.6.0b5, 2023.6.0b6, 2023.6.0, 2023.6.1, 2023.6.2, 2023.6.3, 2023.7.0b0, 2023.7.0b1, 2023.7.0b2, 2023.7.0b3, 2023.7.0b4, 2023.7.0b5, 2023.7.0b6, 2023.7.0, 2023.7.1, 2023.7.2, 2023.7.3, 2023.8.0b0, 2023.8.0b1, 2023.8.0b2, 2023.8.0b3, 2023.8.0b4, 2023.8.0, 2023.8.1, 2023.8.2, 2023.8.3, 2023.8.4, 2023.9.0b0, 2023.9.0b1, 2023.9.0b2, 2023.9.0b3, 2023.9.0b4, 2023.9.0b5, 2023.9.0b6, 2023.9.0, 2023.9.1, 2023.9.2, 2023.9.3, 2023.10.0b0, 2023.10.0b1, 2023.10.0b2, 2023.10.0b3, 2023.10.0b4, 2023.10.0b6, 2023.10.0b7, 2023.10.0b9, 2023.10.0, 2023.10.1, 2023.10.2, 2023.10.3, 2023.10.4, 2023.10.5, 2023.11.0b0, 2023.11.0b1, 2023.11.0b2, 2023.11.0b3, 2023.11.0b4, 2023.11.0b5, 2023.11.0b6, 2023.11.0, 2023.11.1, 2023.11.2, 2023.11.3, 2023.12.0b0, 2023.12.0b1, 2023.12.0b2, 2023.12.0b3, 2023.12.0b4, 2023.12.0b5, 2023.12.0, 2023.12.1, 2023.12.2, 2023.12.3, 2023.12.4, 2024.1.0b0, 2024.1.0b1, 2024.1.0b2, 2024.1.0b3, 2024.1.0b4, 2024.1.0b5, 2024.1.0b6, 2024.1.0b7, 2024.1.0b8, 2024.1.0, 2024.1.1, 2024.1.2, 2024.1.3, 2024.1.4, 2024.1.5, 2024.1.6, 2024.2.0b0, 2024.2.0b1, 2024.2.0b2, 2024.2.0b3, 2024.2.0b4, 2024.2.0b5, 2024.2.0b6, 2024.2.0b7, 2024.2.0b8, 2024.2.0b9, 2024.2.0b10, 2024.2.0b11, 2024.2.0, 2024.2.1, 2024.2.2, 2024.2.3, 2024.2.4, 2024.2.5, 2024.3.0b0, 2024.3.0b1, 2024.3.0b2, 2024.3.0b3, 2024.3.0b4, 2024.3.0b5, 2024.3.0b6, 2024.3.0b7, 2024.3.0b8, 2024.3.0, 2024.3.1, 2024.3.2, 2024.3.3)
ERROR: No matching distribution found for homeassistant==2024.9.3

InnovoDeveloper avatar Oct 03 '24 19:10 InnovoDeveloper

👋 I've provided some details on uv's virtual environment compliance checks and some possible workarounds at https://github.com/astral-sh/uv/issues/7907#issuecomment-2392184750

zanieb avatar Oct 03 '24 19:10 zanieb

@InnovoDeveloper You are mixing up the system Python instance and pyenv Python instance, that is used explicitly for Home Assistant. After running

sudo -u homeassistant bash
. /home/homeassistant/pyenv-activate.sh

can you run this again

python3 --version

It must be Python 3.12, otherwise Home Assistant 3.10 could not have been installed in the first place.

MichaIng avatar Oct 03 '24 19:10 MichaIng

@InnovoDeveloper You are mixing up the system Python instance and pyenv Python instance, that is used explicitly for Home Assistant. After running

sudo -u homeassistant bash
. /home/homeassistant/pyenv-activate.sh

can you run this again

python3 --version

It must be Python 3.12, otherwise Home Assistant 3.10 could not have been installed in the first place.

Yes, I was mixing up the two. the python in the envelope is 3.12.3. still cannot roll back. I'll wait for a fix.

InnovoDeveloper avatar Oct 03 '24 19:10 InnovoDeveloper

This should fix it: https://github.com/MichaIng/DietPi/commit/e7d4053

And to not wait for the update:

sudo sed -i '/^export /a\export UV_SYSTEM_PYTHON=1' /home/homeassistant/pyenv-activate.sh

Running automated tests, though since some builds are running, it will take a few hours: https://github.com/MichaIng/DietPi/actions/runs/11166786788

MichaIng avatar Oct 03 '24 19:10 MichaIng

This should fix it: e7d4053

And to not wait for the update:

sudo sed -i '/^export /a\export UV_SYSTEM_PYTHON=1' /home/homeassistant/pyenv-activate.sh

Thanks. Running 2024.10.0 with no issues.

Yougoshatenshi avatar Oct 03 '24 20:10 Yougoshatenshi

This should fix it: https://github.com/MichaIng/DietPi/commit/e7d4053

And to not wait for the update:


sudo sed -i '/^export /a\export UV_SYSTEM_PYTHON=1' /home/homeassistant/pyenv-activate.sh

Running automated tests, though since some builds are running, it will take a few hours: https://github.com/MichaIng/DietPi/actions/runs/11166786788

Do we run this before upgrading HA or afterwards?

Or does it not make a difference?

Dynamic5912 avatar Oct 03 '24 20:10 Dynamic5912

Do we run this before upgrading HA or afterwards?

Or does it not make a difference?

Before, so HA can initialize directly after the upgrade. Otherwise it does not make difference.

Yougoshatenshi avatar Oct 03 '24 20:10 Yougoshatenshi

Tested and working OK here now!

Dynamic5912 avatar Oct 03 '24 21:10 Dynamic5912

Not sure if related - but now the Ring entity won't load in HA..

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 22:09:58 (5 occurrences)
Last logged: 22:12:59

Error setting up entry [email protected] for ring
Traceback (most recent call last):
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/loader.py", line 1264, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/loader.py", line 1296, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 994, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/components/ring/binary_sensor.py", line 48, in <module>
    capability=RingCapability.DING,
               ^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'RingCapability' has no attribute 'DING'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/components/ring/__init__.py", line 100, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/config_entries.py", line 2142, in async_forward_entry_setups
    await integration.async_get_platforms(platforms)
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/loader.py", line 1177, in async_get_platforms
    import_future.result()
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/loader.py", line 1177, in async_get_platforms
    import_future.result()
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/loader.py", line 1177, in async_get_platforms
    import_future.result()
  [Previous line repeated 6 more times]
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/loader.py", line 1165, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/loader.py", line 1090, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.pyenv/versions/3.12.1/lib/python3.12/site-packages/homeassistant/loader.py", line 1284, in _load_platform
    raise ImportError(
ImportError: Exception importing homeassistant.components.ring.binary_sensor

Dynamic5912 avatar Oct 03 '24 21:10 Dynamic5912

Yes there is another thing which needs to be changed. In the previous HA version, the homeassistant/deps directory was the directory of the internally used Python instance. Now after uv pip3 install ... --target .../homeassistant/deps is used, it is the site-packages directory, which previously was at homeassistant/deps/lib/python3.12/site-packages. So the symlink we create to merge the pyenv and HA internal Python package dirs, needs to be adjusted:

sudo rm -R /mnt/dietpi_userdata/homeassistant/deps
sudo ln -sf /home/homeassistant/.pyenv/versions/3.12.*/lib/python3.12/site-packages /mnt/dietpi_userdata/homeassistant/deps
sudo systemctl restart home-assistant

MichaIng avatar Oct 03 '24 21:10 MichaIng