-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Builds no longer respect IDF_PYTHON_ENV_PATH (IDFGH-9085) #10489
Comments
@Alim-Oezdemir If you need to relocate the python environment, you need to set |
@igrr I have custom installs on my machines to prevent the download/install stuff not needed (cmake, ninja, ccache installed globally already; s2/s3/risc/llvm binaries not applicable, PATH, IDF_PATH and IDF_PYTHON_ENV_PATH set manually). Hence IDF_TOOLS_PATH,install, export weren't necessary. |
Found it, it was in the docs of the eclipse plugin: Required environment variables: ... IDF_PYTHON_ENV_PATH |
The Python system was changed in ESP-IDF v5.0. We consider If you need then you can change |
That enforces the use of install/export mechanism with it's versioned paths like "tools\cmake\3.24.0" and "python_env\idf5.0_py3.10_env". Which is helpful for easy one-time setup, yet cumbersome on developer machines with custom needs. |
@Alim-Oezdemir as @dobairoland said, it is possible to have a different location of the python interpreter. The problem you are running into is happening because the IDF_PYTHON_ENV_PATH doesn't point to the same location as the |
@igrr, just switched back to verify your ideas. Doesn't work for me, python_env holds the environment, yet build complains: ERROR: ...\python_env\idf5.0_py3.10_env\Scripts\python.exe doesn't exist! Please run the install script or "idf_tools.py install-python-env" in order to create it Because the idf_tools.py in contrast to former check_python_dependencies.py expects subfolder with version (e.g. idf5.0_py3.10_env" inside it. |
@Alim-Oezdemir could you please show the values of |
IDF_PYTHON_ENV_PATH c:\...\esp32tools\python_env PATH C:\...\esp32tools\tensa-esp-elf-gdb\bin; C:\...\esp32tools\xtensa-esp32-elf\bin; C:\...\esp32tools\esp32ulp-elf\bin; C:\...\esp32tools\cmake\bin; C:\...\esp32tools\openocd-esp32\bin; C:\...\esp32tools\ninja; C:\...\esp32tools\idf-ex; C:\...\esp32tools\ccache; C:\...\esp32tools\dfu-util; C:\...\esp32tools\python_env\Scripts; C:\...\esp-idf\tools; C:\...\jdk11\bin\server; C:\...\jdk11\bin; C:\WINDOWS\system32; C:\WINDOWS; C:\...\python3\; C:\...\python3\Scripts\; C:\...\WindowsApps; |
Thanks, and could you also check what is the output of |
It gives out two lines: C:\>where python C:\...\esp32tools\python_env\Scripts\python.exe C:\...\python3\python.exe |
If I understand your issue well than you don't like keeping the part May I ask why you don't want to keep the |
@dobairoland, the reason is the same as with the version-ids on the tools folders, stable build environment. For updates it was just necessary to change the contents of the folders. Variables stay same and work across commandline and IDE without duplicate installs. |
IDF_PYTHON_ENV_PATH is the path where the Python environment is created and used. By default it is inside IDF_TOOLS_PATH. IDF_PYTHON_ENV_PATH was exported by idf_tools.py but was not imported back. This fixes the issue and ESP-IDF will honor the value of IDF_PYTHON_ENV_PATH. Closes #10489
Answers checklist.
IDF version.
v5.0
Operating System used.
Windows
How did you build your project?
Eclipse IDE
If you are using Windows, please specify command line type.
CMD
What is the expected behavior?
Builds with manual IDF_PYTHON_ENV_PATH succeeding in v5.0 like in v4.4.3
What is the actual behavior?
Build fails with message like "python not found in HOME/python_env".
Steps to reproduce.
if starting with working setup:
Build or installation Logs.
No response
More Information.
The problem lies in build.cmake:
v5.0 (line 338)
execute_process(COMMAND "${python}" "${idf_path}/tools/idf_tools.py" "check-python-dependencies"
v4.4.3 (line 283)
execute_process(COMMAND "${python}" "${idf_path}/tools/check_python_dependencies.py"
idf_tools.py's check-python-dependencies ignores the IDF_PYTHON_ENV_PATH.
After changing the line to v4.4.3 revision and (just to prove that's the rootcause) circumvention of the new interface_version params by removing
build.cmake
507 idf_build_get_property(component_manager_interface_version __COMPONENT_MANAGER_INTERFACE_VERSION)
512 "--interface_version=${component_manager_interface_version}"
component.cmake
240 "--interface_version=${component_manager_interface_version}"
it works as expected.
The text was updated successfully, but these errors were encountered: