Error while initializing a project (ESP32/ESP-IDF/Gentoo-Linux)

Hi,

I am working under Gentoo Linux using the commandline and platformio core. I don’t like IDEs that much,
which a personal thing… :slight_smile:

In an empty directory I submitted this command:
platformio project init --ide vim --board esp-wrover-kit --project-option “framework=espidf”

and got this output:

    The current working directory /home/user/PLATFORMIO/ESP32/ESPIDF/I2S/examples/step_001 will be used for the project.

    The next files/directories have been created in /home/user/PLATFORMIO/ESP32/ESPIDF/I2S/examples/step_001
    include - Put project header files here
    lib - Put here project specific (private) libraries
    src - Put project source files here
    platformio.ini - Project Configuration File
    Error: Processing esp-wrover-kit (platform: espressif32; board: esp-wrover-kit; framework: espidf)
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Verbose mode can be enabled via `-v, --verbose` option
    CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html
    PLATFORM: Espressif 32 (2.1.0) > Espressif ESP-WROVER-KIT
    HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
    DEBUG: Current (ftdi) On-board (ftdi) 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.40100.200827 (4.1.0) 
     - tool-cmake 3.16.4 
     - tool-esptoolpy 1.30000.201119 (3.0.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...
    -- Found Git: /usr/bin/git (found version "2.29.2") 
    -- The C compiler identification is GNU 8.2.0
    -- The CXX compiler identification is GNU 8.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/user/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc
    -- Check for working C compiler: /home/user/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc
    -- Check for working C compiler: /home/user/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-gcc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: /home/user/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++
    -- Check for working CXX compiler: /home/user/.platformio/packages/toolchain-xtensa32/bin/xtensa-esp32-elf-g++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
    -- Project version: 1
    -- Building ESP-IDF components for target esp32
    -- Checking Python dependencies...
    The following Python requirements are not satisfied:
    future>=0.15.2
    cryptography>=2.1.4
    pyparsing>=2.0.3,<2.4.0
    Please follow the instructions found in the "Set up the tools" section of ESP-IDF Getting Started Guide
    -- Configuring incomplete, errors occurred!
    See also "/home/user/PLATFORMIO/ESP32/ESPIDF/I2S/examples/step_001/.pio/build/esp-wrover-kit/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/user/.platformio/packages/framework-espidf/tools/cmake/build.cmake:271 (message):
      Some Python dependencies must be installed.  Check above message for
      details.
    Call Stack (most recent call first):
      /home/user/.platformio/packages/framework-espidf/tools/cmake/build.cmake:397 (__build_check_python)
      /home/user/.platformio/packages/framework-espidf/tools/cmake/project.cmake:396 (idf_build_process)
      CMakeLists.txt:3 (project)


    ========================================================================================================= [FAILED] Took 0.81 seconds =========================================================================================================

    [1]    80321 exit 1     platformio project init --ide vim --board esp-wrover-kit --project-option 

The problem seems to arise with this line:
ERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec

in which the installed “pip” demands to install everything local to the user to avoid to alter the systems installation of python.

How can I avoid this problem?

Cheers!
mcc

1 Like

Interesting… does Gentoo freaking intercept pip calls? o_O

Please do the following. Open the file ~/.platformio/platforms/espressif32/builder/frameworks/espidf.py. Change the command in

to include --user. The go back to your project and use Project tasks → Miscelleneous → Rebuild Intellisense and then build. Does it get past that error now?

Hi Max,

Thank you for your reply! :slight_smile:

I am working under Gentoo Linux using the commandline and platformio core. I don’t like IDEs that much,
which is a personal thing.

How can I resume from the previous error after patching the file you mentioned?

Cheers!
mcc

Ah. pio init and pio run in the project folder.