Error: uv installation via pip failed with exit code 1 Error: Failed to install Python dependencies into penv

(board: esp32dev; framework: arduino, espidf; platform: https://github.com/pioarduino/platform-espressif32/releases/download/55.03.31-2/platform-espressif32.zip)

Error: uv installation via pip failed with exit code 1
Error: Failed to install Python dependencies into penv
ESPHome Device Builder
Current version: 2025.11.4
Home Assistant
*Installation method: Home Assistant OS

  • Core2025.12.0
  • Supervisor2025.12.2
  • Operating System16.3.1
  • Frontend20251203.0

Did you clear your ESPHome cache first?

How to clean?

Make sure you have a backup of your yaml for each ESPHome device.

Three vertical dots in ESPHome builder for the device leads you to a menu. Select Clean build files. Your next compile will take longer as it takes a while to download fresh versions and rebuild everything, nice and new without possible old garbage corrupting anything.

1 Like

I’ve been getting this error ever since I updated Home Assistant Core to 2025.12.1. I’ve tried to uninstall ESPHome and restarting the server does not fix it. I’ve also cleared the cache, but that didn’t fix it either.

Here is the error I get each time:

INFO ESPHome 2025.11.4
INFO Reading configuration /config/esphome/cistern-water-tank-sensor.yaml...
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Setting CONFIG_LWIP_MAX_SOCKETS to 11 (registered: api=4, captive_portal=4, mdns=2, ota=1)
INFO Compiling app... Build path: /data/build/cistern-water-tank-sensor
Processing cistern-water-tank-sensor (board: esp32dev; framework: espidf; platform: https://github.com/pioarduino/platform-espressif32/releases/download/55.03.31-2/platform-espressif32.zip)
--------------------------------------------------------------------------------
Error: uv installation via pip failed with exit code 1
Error: Failed to install Python dependencies into penv

Show what is prompting the error to be thrown up. Any log entries that are relevant?

Show your yaml code.

esphome:
  name: cistern-water-tank-sensor
  friendly_name: Cistern Water Tank Sensor

esp32:
  board: esp32dev
  framework:
    type: esp-idf

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "XXX"

ota:
  - platform: esphome
    password: "XXX"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Cistern-Water-Tank-Sensor"
    password: "d17FfIOuuiW2"

captive_portal:
    
sensor:
  - platform: ultrasonic
    trigger_pin: GPIO18
    echo_pin: GPIO5
    name: "Water Tank Level"
    unit_of_measurement: "%"
    accuracy_decimals: 1
    device_class: distance
    update_interval: 60s
    pulse_time: 20ms 
    timeout: 6.0m
    filters:
      - lambda: return ((((x*100)-5.5)-(179-5.5))/(179-5.5))*-100;
      - filter_out: nan

Can you format your code in your post please.

Sorry, I haven’t posted much on this site before. It should be fixed now

Thanks. Looks fine. Possible missing file that shows up in your ESPHome log as you are compiling. Post that log here also.

Check on GitHub if it has been reported for ESPHome already, otherwise report it there.

1 Like

Each time I’ve installed the ESPHome updates since Monday, this error has shown up

Interesting, both same board, but one person has reported it with framework ispidf and the other with arduino.

I had ESPHome build the initial install and I coded it within ESPHome, not arduino

Sorry I wasn’t clear, this is where it takes one of two branches.

The compiler log should be interesting for both types.

I understand. That specifies the code language, correct?

The other user used arduino coding, and I used ESPHome, aka esp-idf coding

It pulls in different libraries during compilation.
Both appear to be falling over - off to GitHub to see.

1 Like

I appreciate all the help! It’s been working for months just fine, but the HAOS updates, and the ESPHome updates in the last week have broken everything for me.

Does this GitHub issue look familiar?

Add your yaml and compile logs in GitHub to assist with the developer or Espressif locating the missing file and re-integrating into a future fix. It could be something as simple as a missing comma or dot, or a hyphen instead of a dot.
In the meantime, maybe roll back to an earlier backup of ESPHome and recompile, unless of course your device is still merrily trundling along, quite happy with the current firmware it already has, and wait for the fix to come out.

I noted this web page I first stumbled on may have dissuaded people reporting. I dug deeper…

1 Like

Let me give that a shot and see if that fixes it. Thanks for the link!