question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python not found when installing esp-idf vscode extension (VSC-641)

See original GitHub issue

Hello. 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: image

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:

  1. Reinstall esp-idf extension
  2. Reinstall python
  3. Add the python path in my user variables:

image

  1. Added a python destination in global variables for the python:

image

  1. Updaded global paths with the destination i have created in the preivous point (4. ) image

Appreciate any help solving this issue

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
krupiscommented, May 3, 2021

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.

0reactions
brianignacio5commented, Apr 30, 2021

The virtual environment should be somewhere in C:\Users\Lukas\.espressif\python_env\idf4.2_py3.9_env based on your logs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code doesn't find the ESP-IDF installation at startup
This is my third attempt: every time i reinstall the ESP-IDF extension in VS Code it seems to work fine, but the next...
Read more >
Error while installing ESP-IDF using the Visual Studio Code ...
I tried to install ESP-IDF and its tools with the Visual Studio Code extension but I got errors because there are spaces in...
Read more >
Get Started - ESP32 - — ESP-IDF Programming Guide latest ...
We highly recommend installing the ESP-IDF through your favorite IDE. Eclipse Plugin · VSCode Extension. Manual Installation . For the manual procedure, please ......
Read more >
Error while installing Python virtual environment for ESP-IDF ...
I tried to install ESP-IDF and its tools with the Visual Studio Code extension but I got errors because there are spaces in...
Read more >
Install ESP32 ESP-IDF on Windows and Integrate with VS code
Below we have provided you with a guide to successfully install Python 3.7 or the latest version in Windows operating system. Installing Python...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found