Update python version HA

What’s the easiest way to update the version of python with HA?

We have a fixed version of python for our HA installation. What exactly you like to update to which version?

I get now the following errors when launching HA. I did update HA and this happend after the update. In the error does stand python version 3.10 but when I do does I get version 3.9.

python3 --version
The following integrations and platforms could not be set up:

cloud (Show logs)
assist_pipeline (Show logs)
mobile_app (Show logs)
default_config (Show logs)
Please check your config and logs.

Now will I provide some logs
log default_config

 Logger: homeassistant.setup
Source: setup.py:204
First occurred: 17:43:26 (1 occurrences)
Last logged: 17:43:26

Unable to set up dependencies of default_config. Setup failed for dependencies: assist_pipeline, cloud, mobile_app
Logger: homeassistant.setup
Source: setup.py:206
First occurred: 17:43:26 (1 occurrences)
Last logged: 17:43:26

Setup failed for default_config: (DependencyError(...), 'Could not setup dependencies: assist_pipeline, cloud, mobile_app')

Log mobile_app

Logger: homeassistant.loader
Source: deps/lib/python3.10/site-packages/webrtcvad.py:8
First occurred: 17:43:01 (3 occurrences)
Last logged: 17:43:26

Unexpected exception importing component homeassistant.components.cloud
Unexpected exception importing component homeassistant.components.assist_pipeline
Unexpected exception importing component homeassistant.components.mobile_app
Traceback (most recent call last):
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/homeassistant/loader.py", line 813, in get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/homeassistant/components/cloud/__init__.py", line 36, in <module>
    from . import account_link, http_api
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/homeassistant/components/cloud/http_api.py", line 19, in <module>
    from homeassistant.components import assist_pipeline, conversation, websocket_api
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/homeassistant/components/assist_pipeline/__init__.py", line 25, in <module>
    from .websocket_api import async_register_websocket_api
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/homeassistant/components/assist_pipeline/websocket_api.py", line 30, in <module>
    from .vad import VoiceCommandSegmenter
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/homeassistant/components/assist_pipeline/vad.py", line 4, in <module>
    import webrtcvad
  File "/mnt/dietpi_userdata/homeassistant/deps/lib/python3.10/site-packages/webrtcvad.py", line 8, in <module>
    __version__ = pkg_resources.get_distribution('webrtcvad').version
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/pkg_resources/__init__.py", line 514, in get_distribution
    dist = get_provider(dist)
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/pkg_resources/__init__.py", line 386, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/pkg_resources/__init__.py", line 956, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/pkg_resources/__init__.py", line 815, in resolve
    dist = self._resolve_dist(
  File "/home/homeassistant/.pyenv/versions/3.10.9/lib/python3.10/site-packages/pkg_resources/__init__.py", line 856, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'webrtcvad' distribution was not found and is required by the application
Logger: homeassistant.setup
Source: setup.py:214
First occurred: 17:43:01 (3 occurrences)
Last logged: 17:43:26

Setup failed for cloud: Unable to import component: Exception importing homeassistant.components.cloud
Setup failed for assist_pipeline: Unable to import component: Exception importing homeassistant.components.assist_pipeline
Setup failed for mobile_app: Unable to import component: Exception importing homeassistant.components.mobile_app

All the other logs look like the same to those logs. I have already checked if The ‘webrtcvad’ distribution was installed but it was and I also removed it and reinstalled it but it doesn’t work. Does anyone know how to fix this? If you need more info don’t hesitate to ask.

HA is running it’s own independent python version using pyenv. Therefore, version is different.

pls can you reboot your system. Afterwards check CPU usage using htop. If there is no further load from HA, have a look to the full system log and share it if possible

journalctl -u home-assistant

Yeah I did restart and HA is just running but it still gives me the same error

The following integrations and platforms could not be set up:

cloud (Show logs)
assist_pipeline (Show logs)
mobile_app (Show logs)
default_config (Show logs)
Please check your config and logs.

and what I already have provided in my message before. I don’t have any idea to fix the error

home-assistant_2023-05-10T20-31-10.941Z.log (15,5 KB)
This is the full system log

can you fill following information

Required

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • Kernel version | uname -a
  • Architecture | dpkg --print-architecture
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)

Dietpi version

G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=16
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='not applicable'

Distro version

bullseye

Kernel version

Linux DietPi 6.1.11-meson64 #23.02.2 SMP PREEMPT Sat Feb 18 00:07:55 UTC 2023 aarch64 GNU/Linux

Architecture

arm64

SBC model

Odroid C4/HC4 (aarch64)

Did you already try reinstalling of whole HA? If not, can you do

dietpi-update 1
dietpi-software reinstall 157

If I reinstall do I keep the whole configuration as it now is?

usually everything should be kept. However, it is highly recommended to perform a dietpi-backup beforehand

if it helps, I also had problems with assist_pipeline, what I did was to update pip in the python environment of homeassistant then update homeassistant.

I had the same error messages. A reinstallation solved it. Afterwards I needed a restart of OS to make it work properly again. :+1: