PlatformIO Community

Espressif32 python dependencies

Hi, I’m starting with PlatformIO on ESP32 and I’m getting this error:

cube@gecko ~/line_follower (v2) $ platformio run
Processing release (platform: espressif32; board: esp32doit-devkit-v1; framework: espidf)
------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 1.12.4 > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-espidf 3.40001.200521 (4.0.1) 
 - tool-cmake 3.16.4 
 - tool-esptoolpy 1.20600.0 (2.6.0) 
 - tool-ninja 1.7.1 
 - toolchain-esp32ulp 1.22851.191205 (2.28.51) 
 - toolchain-xtensa32 2.80200.200827 (8.2.0)
Installing ESP-IDF's Python dependencies
ERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec
*** Error 1
Reading CMake configuration...
-- Project version: HW-v2.0.0-dirty
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
The following Python requirements are not satisfied:
future>=0.15.2
pyparsing>=2.0.3,<2.4.0
Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required packages.
Alternatively, you can run "/usr/lib/python-exec/python3.9/python -m pip install --user -r /home/cube/.platformio/packages/framework-espidf/requirements.txt" for resolving the issue.
-- Configuring incomplete, errors occurred!
See also "/home/cube/line_follower/.pio/build/release/CMakeFiles/CMakeOutput.log".

fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
CMake Error at /home/cube/.platformio/packages/framework-espidf/tools/cmake/build.cmake:270 (message):
  Some Python dependencies must be installed.  Check above message for
  details.
Call Stack (most recent call first):
  /home/cube/.platformio/packages/framework-espidf/tools/cmake/build.cmake:396 (__build_check_python)
  /home/cube/.platformio/packages/framework-espidf/tools/cmake/project.cmake:348 (idf_build_process)
  CMakeLists.txt:3 (project)



================================================= [FAILED] Took 0.97 seconds =================================================

This looks like something during the build is trying to make a system wide install of some python packages. I have tried to create a venv and run platformio run from inside it, but the error doesn’t change.

Is there some way to work around this (Other than installing / downgrading the dependencies as system packages)?