esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
291 stars 34 forks source link

Since updating to 2023.12.5, compile fails with: "no module named pip" #5376

Open lweberru opened 5 months ago

lweberru commented 5 months ago

The problem

Since I updated my esphome dashboard (docker) to 2023.12.5, I cant compile/update my devices any longer.

Compile fails with the following error:

INFO ESPHome 2023.12.5
INFO Reading configuration /config/atom-lite-1.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing atom-lite-1 (board: m5stack-atom; framework: espidf; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40405.230623 (4.4.5) 
 - tool-cmake @ 3.16.4 
 - tool-ninja @ 1.7.1 
 - toolchain-esp32ulp @ 2.35.0-20220830 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
/cache/platformio/penv/.espidf-4.4.5/bin/python: No module named pip
CalledProcessError: Command '['/cache/platformio/penv/.espidf-4.4.5/bin/python', '-m', 'pip', 'list', '--format=json', '--disable-pip-version-check']' returned non-zero exit status 1.:
  File "/usr/local/lib/python3.11/dist-packages/platformio/builder/main.py", line 173:
    env.SConscript("$BUILD_SCRIPT")
  File "/cache/platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/cache/platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/cache/platformio/platforms/espressif32/builder/main.py", line 312:
    target_elf = env.BuildProgram()
  File "/cache/platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.11/dist-packages/platformio/builder/tools/piobuild.py", line 61:
    env.ProcessProgramDeps()
  File "/cache/platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.11/dist-packages/platformio/builder/tools/piobuild.py", line 121:
    env.BuildFrameworks(env.get("PIOFRAMEWORK"))
  File "/cache/platformio/packages/tool-scons/scons-local-4.5.2/SCons/Util/envs.py", line 242:
    return self.method(*nargs, **kwargs)
  File "/usr/local/lib/python3.11/dist-packages/platformio/builder/tools/piobuild.py", line 342:
    SConscript(env.GetFrameworkScript(name), exports="env")
  File "/cache/platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 662:
    return method(*args, **kw)
  File "/cache/platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 598:
    return _SConscript(self.fs, *files, **subst_kw)
  File "/cache/platformio/packages/tool-scons/scons-local-4.5.2/SCons/Script/SConscript.py", line 285:
    exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals)
  File "/cache/platformio/platforms/espressif32/builder/frameworks/espidf.py", line 1233:
    install_python_deps()
  File "/cache/platformio/platforms/espressif32/builder/frameworks/espidf.py", line 1110:
    installed_packages = _get_installed_pip_packages(python_exe_path)
  File "/cache/platformio/platforms/espressif32/builder/frameworks/espidf.py", line 1078:
    pip_output = subprocess.check_output(
  File "/usr/lib/python3.11/subprocess.py", line 466:
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.11/subprocess.py", line 571:
    raise CalledProcessError(retcode, process.args,

my docker-compose looks like this:

version: '3.2'

services:
  esphome:
    container_name: esphome
    image: esphome/esphome:latest
    command: -v dashboard --username admin --password <mypassword> /config
    volumes:
      - /volume1/docker/Esphome/config:/config
      - /volume1/docker/Esphome/cache:/cache
      - /etc/localtime:/etc/localtime:ro
    environment:
      - ESPHOME_DASHBOARD_USE_PING="true"
      - PLATFORMIO_CORE_DIR=/cache/platformio
      - PLATFORMIO_GLOBALLIB_DIR=/cache/platformio/lib
      - PLATFORMIO_SETTING_CHECK_PLATFORMIO_INTERVAL=665
      - PLATFORMIO_SETTING_CHECK_PLATFORMS_INTERVAL=666
      - PLATFORMIO_SETTING_CHECK_LIBRARIES_INTERVAL=667

    restart: always
    privileged: true
    network_mode: host

my config looks like this (only relevant parts):

substitutions:
  name: atom-lite-1
  staticip: 192.168.1.145

esphome:
  name: ${name}
  name_add_mac_suffix: True
  platformio_options:
    build_flags: 
      - -Wno-maybe-uninitialized
packages:
  esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/m5stack-atom-lite.yaml@main

esp32:
  board: m5stack-atom
  framework:
    type: esp-idf    
[...]

Which version of ESPHome has the issue?

2023.12.5

What type of installation are you using?

Docker

Which version of Home Assistant has the issue?

2024.1.3

What platform are you using?

ESP32-IDF

Board

m5stack-atom

Component causing the issue

espidf

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

lweberru commented 5 months ago

I manuelly deleted the whole cache dir (/cache) and retried. This time the compile was successfully.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.