Eclipse ESP-IDF python requirements are not satisfied error

dclosson
Posts: 1
Joined: Thu Aug 27, 2020 8:03 pm

Eclipse ESP-IDF python requirements are not satisfied error

Postby dclosson » Thu Aug 27, 2020 8:17 pm

Hello,

I'm receiving the following error when attempting to build the hello_world project from ESP-IDF in eclipse:

Building in: C:\Users\danc\eclipse-workspace\hello_world\build
cmake -G Ninja -DCMAKE_TOOLCHAIN_FILE=C:\Users\danc\esp\esp-idf\tools\cmake\toolchain-esp32.cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DIDF_TARGET=esp32 C:\Users\danc\eclipse-workspace\hello_world
-- Project is not inside a git repository, or git repository has no commits; will not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32
-- Checking Python dependencies...
The following Python requirements are not satisfied:
gdbgui>=0.13.2.0
To install the missing packages, please run "C:\Users\danc\esp\esp-idf\install.bat"
Diagnostic information:
IDF_PYTHON_ENV_PATH: C:\Users\danc\.espressif\python_env\idf4.3_py3.8_env
Python interpreter used: C:\Users\danc\.espressif\python_env\idf4.3_py3.8_env\Scripts\python.exe
CMake Error at C:/Users/danc/esp/esp-idf/tools/cmake/build.cmake:271 (message):
Some Python dependencies must be installed. Check above message for
details.
Call Stack (most recent call first):
C:/Users/danc/esp/esp-idf/tools/cmake/build.cmake:397 (__build_check_python)
C:/Users/danc/esp/esp-idf/tools/cmake/project.cmake:396 (idf_build_process)
CMakeLists.txt:6 (project)

-- Configuring incomplete, errors occurred!
See also "C:/Users/danc/eclipse-workspace/hello_world/build/CMakeFiles/CMakeOutput.log".
cmake --build . -- -v
ninja: error: loading 'build.ninja': The system cannot find the file specified.

Build complete (0 errors, 0 warnings): C:\Users\danc\eclipse-workspace\hello_world\build


I've tried following the recommendation to run install.bat and it states that all the requirements are already satisfied and to run export.bat.

When I run export.bat it runs into missing packages again and tells me to run install.bat.

I'm running
Python 3.8.5
Git 2.28.0
Java 14.0.2
ESP-IDF v4.1 (v4.3-dev-907-g6c17e3a64 from git describe --tags)

Please help ESP forum! Thanks,
Dan C.

Jamawa
Posts: 16
Joined: Sun Aug 16, 2020 10:46 am

Re: Eclipse ESP-IDF python requirements are not satisfied error

Postby Jamawa » Fri Sep 11, 2020 8:26 pm

It sounds like install.bat looks in a different directory than the one from which you are running. This can be the case if the variable IDF_PYTHON_ENV_PATH in Eclipse's settings points to something other than the one you are running in. It should point to "C:\Users\danc\.espressif\python_env\idf4.3_py3.8_env"
You can find this variable in Preferences -> C/C++ -> Build -> Environment.
This is the directory install.bat uses to install everything, and it probably has a correct version of gdbgui in lib -> python3.8 -> site-packages whereas the idf4.3_py3.8_env has an older version.

If the setting is wrong; correct it and rerun install (from within Eclipse). After that I expect the problem to be solved, it did so for me the other day.

RLB_Sr
Posts: 3
Joined: Fri Feb 02, 2024 8:25 pm

Re: Eclipse ESP-IDF python requirements are not satisfied error

Postby RLB_Sr » Tue Mar 05, 2024 9:02 pm

I had a similar error while trying to build the hello_world example for esp32c6. I had previously been able to compile the project from a command line by entering idf.py build (after running the other required commands:
install.bat, export.bat, idf.py set-target esp32c6 )
and it compiled successfully. However the project would not compile from the Visual Studio 2019

I located the function that was failing and added messages to print out the variables that were being used:
${python} and ${idf_path} (which were python and C:/SysGCC/esp32/esp-idf\v5.2)
then I ran the function externally in a CMD console (the one created during the espressif idf install):

C:\projects\VS2019\ESP32C6Hello1> python C:\SysGCC\esp32\esp-idf\v5.2\tools\idf_tools.py check-python-dependencies
Requirement files:
- C:\Espressif\frameworks\esp-idf-v5.2\tools\requirements\requirements.core.txt
Python being checked: C:\Espressif\python_env\idf5.2_py3.11_env\Scripts\python.exe
Python requirements are satisfied.

Which indicated there really were no problems with the requirements.

Then I commented out the call in the build.cmake file:

Code: Select all

#
# Check if the Python interpreter used for the build has all the required modules.
#
function(__build_check_python)
    idf_build_get_property(check __CHECK_PYTHON)
    if(check)
        idf_build_get_property(python PYTHON)
        idf_build_get_property(idf_path IDF_PATH)
        message(STATUS "Checking Python dependencies...")
        message (STATUS "Commented out dependency check RLB 5Mar2024")
 #       execute_process(COMMAND "${python}" "${idf_path}/tools/idf_tools.py" "check-python-dependencies"
 #          RESULT_VARIABLE result)
 #       if(result EQUAL 1)
 #           # check_python_dependencies returns error code 1 on failure
 #           message(FATAL_ERROR "Some Python dependencies must be installed. Check above message for details.")
 #       elseif(NOT result EQUAL 0)
 #          # means check_python_dependencies.py failed to run at all, result should be an error message
 #           message(FATAL_ERROR "Failed to run Python dependency check. Python: ${python}, Error: ${result}")
 #       endif()
    endif()
endfunction()
Then the VisualStudio2019 build compiled with no errors.

I realize this is not a long term fix but there is something wrong with the call in the function causing a return that is considered an error. I consider the function "__build_check_python" to have a bug.

Who is online

Users browsing this forum: No registered users and 88 guests