Python not found when installing esp-idf vscode extension (VSC-641)
See original GitHub issueHello. I am having a lot of issues while installing esp-idf extension for VS code.
I have downloaded Python from the link below: https://www.python.org/downloads/
And select a default installation path, which in my case is: C:\Users\Lukas\AppData\Local\Programs\Python\Python39
I then followed the esp-idf extension installation procedure for the vscode. I have selected epxress instalation with the following parameters:
After the installation of the extension, it returns me an error message:
Installing ESP-IDF extension python packages in C:\Users\Lukas\.espressif\python_env\idf4.2_py3.9_env\Scripts\python.exe ...
No Python at 'C:\Users\Lukas\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe'
Command failed: "C:\Users\Lukas\.espressif\python_env\idf4.2_py3.9_env\Scripts\python.exe" -m pip install --no-warn-script-location -r "c:\Users\Lukas\.vscode\extensions\espressif.esp-idf-extension-1.0.3\requirements.txt"
No Python at 'C:\Users\Lukas\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe'
Command failed: "C:\Users\Lukas\.espressif\python_env\idf4.2_py3.9_env\Scripts\python.exe" -m pip install --no-warn-script-location -r "c:\Users\Lukas\.vscode\extensions\espressif.esp-idf-extension-1.0.3\requirements.txt"
No Python at 'C:\Users\Lukas\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe'
It seems like it is looking for at a completely different location to where it is supposed to look: 'C:\Users\Lukas\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python I do not understand how did visual studio got this location from.
From what I know, this python destination is default when the python is downloaded and installed from the windows microsoft store. Perhaps I have done it years ago but since then I have done many things ( deleted and reinstalled python multiple times and etc… )…
Can someone suggest a ways to debug this issue? Also, can someone explain what is the point of creating a virtual python environment? I do not really understand what does that mean. Can the extension not use the normal Python that I have installed on my pc without using virtual environment?
Things I have done:
- Reinstall esp-idf extension
- Reinstall python
- Add the python path in my user variables:
- Added a python destination in global variables for the python:
- Updaded global paths with the destination i have created in the preivous point (4. )
Appreciate any help solving this issue
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Hello. Sorry for the delayed response, I have been away for the weekend. I have deleted the python_env folder contents and tried to reinstall the esp-idf extension again. It did fix the issue. I am now able to sucesfully build and flash my ESP32 device without any issues. Thank you very much.
The virtual environment should be somewhere in
C:\Users\Lukas\.espressif\python_env\idf4.2_py3.9_env
based on your logs.