microsoft / PTVS

Python Tools for Visual Studio
https://aka.ms/PTVS
Apache License 2.0
2.52k stars 673 forks source link

Added wrong python reference in project setup and now get error #7846

Closed vsfeedback closed 4 months ago

vsfeedback commented 4 months ago

This issue has been moved from a ticket on Developer Community.


New -> VisualGDB project -> ESP32/ESP8266 IDF/ADF Project Wizard -> Project Type :: CMake Toolchain :: Toolchain: Esp32 in C:\SysGCC\esp32 Device : ESP32C6

Get Failed to initialize virtual Python environment

The problem after adding first project as described above but added required reference to python (was not previously setup) and I pointed it to the wrong location (one I had previously setup in "C:\msys32\mingw32\bin\python.exe"

This caused the following log to be printed:

Run "C:\msys32\mingw32\bin\python.exe C:\SysGCC\esp32\esp-idf/v5.1\tools\idf_tools.py install-python-env" in directory "" on local computer

File "C:\SysGCC\esp32\esp-idf/v5.1\tools\idf_tools.py", line 458 info(f'Downloading {url}') ^ SyntaxError: invalid syntax

Command exited with code 1

I can not figure out how to undo the error.


Original Comments

Rex Brown on 2/26/2024, 02:17 PM:

(private comment, text removed)

Rex Brown on 2/26/2024, 02:22 PM:

(private comment, text removed)

Feedback Bot on 2/26/2024, 08:59 PM:

(private comment, text removed)


Original Solutions

(no solutions)

RexLBrownSr commented 4 months ago

I found an option in VisualStudio that allows modifying the path and this is no longer an issue: Debug -> options -> VisualGDB/General/Tools:Python directory

StellaHuang95 commented 4 months ago

Glad to hear that!