Hello,
I found 2 related things.
1.
The last error message in the Eclipse Console is as follows:
- Executing C:\Users\Edmundo\.espressif\python_env\idf5.3_py3.13_env/Scripts/python.exe d:\tools\eclipseidf\esp-idf-v5.3.1\tools\idf.py --list-targets
Cannot import module "click". This usually means that "idf.py" was not spawned within an ESP-IDF shell environment or the python virtual environment used by "idf.py" is corrupted.
Please use idf.py only in an ESP-IDF shell environment. If problem persists, please try to install ESP-IDF tools again as described in the Get Started guide.
Cannot import module "click". This usually means that "idf.py" was not spawned within an ESP-IDF shell environment or the python virtual environment used by "idf.py" is corrupted.
Please use idf.py only in an ESP-IDF shell environment. If problem persists, please try to install ESP-IDF tools again as described in the Get Started guide.
As shown the command
idf.py --list-targets is called with the complete path of
python.exe.
If I open a configured and running ESP-IDF 5.3 PowerShell (installed with the offline manual install method) and start a simple
idf.py it works as expected. Add the complete path as it is done in Eclipse fails with the same error.
So I assume that it s
- # simple idf.py
PS C:\Espressif\frameworks\esp-idf-v5.3.1> idf.py --list-targets
esp32
esp32s2
esp32c3
esp32s3
esp32c2
esp32c6
esp32h2
esp32p4
# complete path to idf.py
PS C:\Espressif\frameworks\esp-idf-v5.3.1> C:\Users\Roman\.espressif\python_env\idf5.3_py3.13_env/Scripts/python.exe d:\tools\eclipseidf\esp-idf-v5.3.1\tools\idf.py --list-targets
Cannot import module "click". This usually means that "idf.py" was not spawned within an ESP-IDF shell environment or the python virtual environment used by "idf.py" is corrupted.
Please use idf.py only in an ESP-IDF shell environment. If problem persists, please try to install ESP-IDF tools again as described in the Get Started guide.
2.
The same error happens in Espressif-IDE if an existing ESP-IDF is imported by with the IDF Manager.
I have a running VSCODE based ESP installation and also the manual ESP Offline installation that includes the Eclipse based Espressif-IDE.
If I try to add the existing VSCODE ESP-IDF from inside the IDF Manager of the Expressif IDE by "Choose existing ESP-Directory" i get the same red marked error message shown above shortly appears but the process does not stop.
At the end I see the requested ESP targets.
My assumption: The problem is that idf.py is called with the complete path.
Many thanks for reading this and best regards,
Edmundo