vscode esp-idf 5.4 can not find tools/python_env folder nor idf5.5_py3.10_env

ksanger
Posts: 6
Joined: Sun Apr 02, 2023 7:29 pm

vscode esp-idf 5.4 can not find tools/python_env folder nor idf5.5_py3.10_env

Postby ksanger » Mon Feb 17, 2025 7:16 pm

Iv'e installed esp-idf V5.4 in linux. Ran the command to source ./exports.sh. Then inside vscode we have to install it again as vscode can't find any esp-idf version. After installing it within vscode then when we go to build we get these error messages.
Executing task: /home/kurt/esp/esp-idf/tools/python_env/idf5.5_py3.10_env/bin/python /home/kurt/esp/esp-idf/tools/idf_size.py /home/kurt/Workspace/esp32_2025/hello_world/build/hello_world.map


* The terminal process failed to launch: Path to shell executable "/home/kurt/esp/esp-idf/tools/python_env/idf5.5_py3.10_env/bin/python" does not exist.
The folder /home/kurt/esp/esp-idf/tools/python_env does not exist. I loaded esp-idf 5.4 and its looking for idf.5_py3.10_env? Have no clue how to fix this.

uC_Jon
Posts: 25
Joined: Fri Jan 05, 2024 7:03 pm

Re: vscode esp-idf 5.4 can not find tools/python_env folder nor idf5.5_py3.10_env

Postby uC_Jon » Tue Feb 18, 2025 1:41 pm

Did you run the install.sh at least once before running the export.sh?

The install creates a /home/user/.espressif directory by default.

Another thing to consider is that you need python installed in to the OS (1) for it to then install a venv environment within the /home/user/.espressif/python_env directory (which is created during the install, along with things such as the compiler/gdb etc.).

Once all that is done, then within vscode you need to install the esp-idf extension and configure it (I always choose the: use the "use the existing setup", which should search your pc and/or use the default locations).

*edited to add*

I've found that following the "getting started" step by step and then testing an example app compiles via the command line before installing vscode/esp-idf extension is an easy way to prove its all installed correctly; and then I always use the command line and export.sh (once per session/tab) then "code ." or "code ./mything.code-workspace" from the folder I wish to use seems to be the most stable way of launching vscode for esp development work.

(1) And at one point I seem to recall you might have needed to create a "python" link in the /usr/bin directory pointing to the python3 binary but looking at my current setup I only have the python3 binary so i'm guessing that isn't required any longer. I think it may have been around the time that python2 and python3 both co-existed and the link was the thing that decided which was the default but a clean OS and apt install might only have installed python3 so things looking for "python" failed.

Who is online

Users browsing this forum: No registered users and 105 guests