Closed jiapei100 closed 7 months ago
It looks idf.py
is unable to find the installed urllib3-1.26.18
and requests_file-1.5.1
under folder ~/.espressif/python_env/idf5.3_py3.10_env/lib/python3.10/site-packages
, but under ~/.local/lib/python3.10/site-packages
.
➜ esp-idf git:(master) ✗ idf.py --version
The following Python requirements are not satisfied:
Requirement 'urllib3<2' was not met. Installed version: 2.2.0
Requirement 'requests-file<2' was not met. Installed version: 2.0.0
To install the missing packages, please run "install.sh"
Diagnostic information:
IDF_PYTHON_ENV_PATH: ~/.espressif/python_env/idf5.3_py3.10_env
Python interpreter used: ~/.espressif/python_env/idf5.3_py3.10_env/bin/python
Constraint file: ~/.espressif/espidf.constraints.v5.3.txt
Requirement files:
- ....../esp-idf/tools/requirements/requirements.core.txt
Python being checked: ~/.espressif/python_env/idf5.3_py3.10_env/bin/python
ESP-IDF v5.3-dev-1724-ga5b261f699-dirty
➜ site-packages pwd
~/.espressif/python_env/idf5.3_py3.10_env/lib/python3.10/site-packages
➜ site-packages ls
esp_coredump esp_idf_monitor-1.4.0.dist-info esp_idf_size-1.1.0.dist-info idf_component_tools requests_file.py
esp_coredump-1.10.0.dist-info esp_idf_nvs_partition_gen espsecure kconfcheck test
espefuse esp_idf_nvs_partition_gen-0.1.1.dist-info esptool kconfgen tests
esp_idf_kconfig esp_idf_panic_decoder esptool-4.8.dev1.dist-info kconfserver urllib3
esp_idf_kconfig-2.1.0.dist-info esp_idf_panic_decoder-1.0.1.dist-info idf_component_manager __pycache__ urllib3-1.26.18.dist-info
esp_idf_monitor esp_idf_size idf_component_manager-1.4.2.dist-info requests_file-1.5.1.dist-info
➜ site-packages
➜ ~ pip show urllib3
Name: urllib3
Version: 2.2.0
Summary: HTTP library with thread-safe connection pooling, file post, and more.
Home-page:
Author:
Author-email: Andrey Petrov <andrey.petrov@shazow.net>
License:
Location: ~/.local/lib/python3.10/site-packages
Requires:
Required-by: requests
➜ ~ pip show requests_file
Name: requests-file
Version: 2.0.0
Summary: File transport adapter for Requests
Home-page:
Author:
Author-email: David Shea <reallylongword@gmail.com>
License: Apache 2.0
Location: ~/.local/lib/python3.10/site-packages
Requires: requests
Required-by:
➜ ~
It looks the issue is from idf-component-manager
, should be just in the setup.py:
https://github.com/espressif/idf-component-manager/pull/50
Sorry that I have to re-open this issue, because I now met the same issue as https://github.com/espressif/esp-idf/issues/10823, and my error message is:
[2/2] idf (5.3.0)
-- Project sdkconfig file ....../esp-who/examples/human_face_detection/lcd/sdkconfig
~/.espressif/python_env/idf5.3_py3.10_env/bin/python: No module named kconfgen.__main__; 'kconfgen' is a package and cannot be directly executed
CMake Error at /opt/Espressif/esp-idf/tools/cmake/kconfig.cmake:209 (message):
Failed to run kconfgen
(~/.espressif/python_env/idf5.3_py3.10_env/bin/python;-m;kconfgen;--list-separator=semicolon;--kconfig;/opt/Espressif/esp-idf/Kconfig;--sdkconfig-rename;/opt/Espressif/esp-idf/sdkconfig.rename;--config;....../esp-who/examples/human_face_detection/lcd/sdkconfig;--defaults;....../esp-who/examples/human_face_detection/lcd/sdkconfig.defaults;--defaults;....../esp-who/examples/human_face_detection/lcd/sdkconfig.defaults.esp32s3;--env-file;....../esp-who/examples/human_face_detection/lcd/build/config.env).
Error 1
Call Stack (most recent call first):
/opt/Espressif/esp-idf/tools/cmake/build.cmake:615 (__kconfig_generate_config)
/opt/Espressif/esp-idf/tools/cmake/project.cmake:710 (idf_build_process)
CMakeLists.txt:8 (project)
-- Configuring incomplete, errors occurred!
I don't remember any similar issue when packages installed in ~/.local/
would block installing different versions in the virtual environment. Did you create ~/.espressif/python_env/idf5.3_py3.10_env
on your own? Could you please remove it and re-create it by re-running install.sh
?
This is just an irrelevant side note. Your ESP-IDF version is not 5.1.2 but the the upcoming v5.3 (master branch).
Have you set any of the ESP-IDF environment variables permanently in your system (e.g. IDF_PYTHON_ENV_PATH
)? The output of install.sh
doesn't seem right to me. It looks as if the Python environment would be redirected to ~/.local/lib/python3.10
. After that, the export script switches to the ESP-IDF environment (based on your idf.py --version
) correctly. That is why you getting these issues. The install script updates a different environment.
My bad... I got 2 versions of kconfgen installed, one under ~/.local
, the other under ~/.espressif
.
Thank you
Answers checklist.
IDF version.
5.1.2
Operating System used.
Linux
How did you build your project?
Command line with Make
If you are using Windows, please specify command line type.
None
What is the expected behavior?
Dependent on
What is the actual behavior?
ALWAYS install requests_file-1.5.1 and urllib3-1.26.18 by default.
Steps to reproduce.
Just hit
./install.sh
Build or installation Logs.
More Information.