Python3 missing from Home Assistant Core 2025.11.1

I have a few sensors i run as a python script directly through home assisant in the configuration yaml, they were using venv and python, and has been working for a while, but it seems im getting “python3 command not found” im unsure when this happened if it was after the update to 11.1 or before

Home Assistant OS 16.3
Home Assistant COre 2025.11.1

i`[core-ssh ~]$ python3
bash: python3: command not found
[core-ssh ~]$ python3
bash: python3: command not found
[core-ssh ~]$ python
bash: python: command not found
[core-ssh ~]$ which python
[core-ssh ~]$

[core-ssh ~]$ ls -la /config/config/scripts/venv/bin/python3
lrwxrwxrwx 1 root root 16 Jan 28 2025 /config/config/scripts/venv/bin/python3 → /usr/bin/python3
[core-ssh ~]$ ls /usr/bin/python3
ls: /usr/bin/python3: No such file or directory

`

It has been working before ?? what happened?

Did your update complete successfully?

Yes everything is working fine, only thing not working is my custom scripts that pulls some data from my influxdb to show some data.

but your configuration.yaml contains the following line?

python_script:

no i always just did

sensor:

  • platform: command_line
    name: “ChargePriceCurrentMonth”
    command: “/config/config/scripts/getChargePriceCurrentMonth.sh”

the sh script activates the virtual enviroment with the requerements for the python script.

In that case … I’m out.
I call my python scripts straight which requires that the config line as mentioned in the docs but surely this won’t help much if running sh commands.

thanks, i just fixed it by installed python and pip again, and recreated the venv. im just surpsised python package suddenly was removed from my system. i have been using that setting for around a year, through diffrent upgrades.

Wasn’t python recently upgraded/updated on one of the HA updates? Perhaps this also wiped existing venvs since created by an outdated version? I don’t know I’m not that deep into enviroments I’m happy when I’m able to set them up.

it was, but python3 was not even installed i had to do the

apk add --update --no-cache python3
python3 -m ensurepip

that was the confusing part, there were no python3 binarys and my venv was pointhing to a python3 that did not excist anymore… if they had just updated it, everything would be fine. Hopefully the above can help if anyone else is experience the same.

1 Like

You are probably right, but I don’t get it. HA is entirely written in python, running python 3.13.9 at the moment. So how can python3 not be available ? Container problems ?

no idea, but i can see that my scripts are still not executing, so the config that had been working for a year, is not working now…

this used to work

sensor:
  - platform: command_line
    name: "ChargePriceCurrentMonth"
    command: "/config/config/scripts/getChargePriceCurrentMonth.sh" # Fixed path
    unit_of_measurement: "DKK"
    scan_interval: 3600