Page 1 of 1

ESP-IDF setup error in vscode with ESP-IDF extension

Posted: Wed Jun 12, 2024 5:34 am
by jhlee1
Install ESP-IDF: v5.2.2
VSCode: v1.90.0
ESP-IDF Extension: v1.7.1

Hi,
I try to install ESP-IDF stable version(v5.2.2) in VSCode
But, I face error message when install it.

ESP-IDF was install in directory, but setup in vscode with esp-idf extension is not completed

Steps to reproduce.
1. Install VSCode and ESP-IDF Extension

2. write "ESP-IDF: Configure ESP-IDF extension" in command palette and click

3. click "EXPRESS"
step3.png
step3.png (31.95 KiB) Viewed 4489 times

4. Select ESP-IDF v5.2.2 and install
step4.png
step4.png (20.09 KiB) Viewed 4489 times

When complete install, face error message.
setup error message.png
setup error message.png (24.53 KiB) Viewed 4489 times

When creating an example in VSCode("ESP-IDF:Show Example Project" in the command palette), the ESP-IDF version v5.2.2 is not activated, and when checking the USE EXISTING SETUP item in "ESP-IDF: Configure ESP-IDF extension", v5.2.2 does not appear.

How can I complete setup?

Thanks.

Re: ESP-IDF setup error in vscode with ESP-IDF extension

Posted: Fri Jun 14, 2024 4:56 am
by ESP_bignacio
In Visual Studio Code select menu View then click Command Palette... and type ESP-IDF: Doctor Command to generate a report of your environment configuration and it will be copied in your clipboard to paste anywhere.
Check log file which can be obtained from:
Windows: %USERPROFILE%\.vscode\extensions\espressif.esp-idf-extension-VERSION\esp_idf_vsc_ext.log
Linux & MacOSX: $HOME/.vscode/extensions/espressif.esp-idf-extension-VERSION/esp_idf_vsc_ext.log

Could you share this information to find out the error ?

Re: ESP-IDF setup error in vscode with ESP-IDF extension

Posted: Mon Jun 17, 2024 10:39 am
by jhlee1
Hi,
I found below in log file you mentioned:

Error: Command failed: \"d:\\esp\\espressif\\tools\\idf-python\\3.11.2\\python.exe\" \"d:\\esp\\v5.2.2\\esp-idf\\tools\\idf_tools.py\" install-python-env\nERROR: Python environment is set to d:\\esp\\espressif\\python_env\\idf5.2_py3.11_env which was generated for ESP-IDF v5.2.2 instead of the current 5.2. The issue can be solved by (1) removing the directory and re-running the install script, or (2) unsetting the IDF_PYTHON_ENV_PATH environment variable, or (3) re-runing the install script from a clean shell where an ESP-IDF environment is not active.

I tried the first method suggested in the log, and the installation appears to have completed normally in VSCode.
esp-idf_v5.2.2 settup.png
esp-idf_v5.2.2 settup.png (13.48 KiB) Viewed 4257 times
It has been resolved, but I think the same problem appears to occur even if v5.2.2 is additionally installed in an environment where the v5.2 version is installed.

Re: ESP-IDF setup error in vscode with ESP-IDF extension

Posted: Tue Jun 18, 2024 12:31 am
by jhlee1
There is only one difference between IDF setup success and failure.

It just need to add `idf_version.txt` in <IDF_TOOLS_PATH>\python_env\idf5.2_py3.11_env before download or search ESP-IDF setup.
Content of `idf_version.txt` file is `5.2`.

Re: ESP-IDF setup error in vscode with ESP-IDF extension

Posted: Fri Jun 21, 2024 8:15 am
by ESP_bignacio
We should have a fix in this vsix installer and it will be part of the next v1.8.0 release.

You can try by uninstall your current esp-idf vscode extension and install the vsix from the link with Install from VSIX command in vscode.