Use MSYS2 Python interpreters in Windows for interactive development #22277
Labels
area-environments
Features relating to handling interpreter environments
feature-request
Request for new features or functionality
I want to use a Python executable shipped with MSYS.
A terminal can be opened as explained here by appending this to
settings.json
:Since I want to use tools that can be installed in MSYS from a Python shipped with MSYS2 (in my case "rsync"), I figured that it would be nice to use that interpreter directly in VSCode to execute files e.g. line by line from the editor.
So I tested the following commands as a "custom Python interpreter":
C:\\msys64\\msys2_shell.cmd -defterm -here -no-start -ucrt64 -c "python"
and
cmd.exe /C "C:\\msys64\\msys2_shell.cmd -defterm -here -no-start -ucrt64 -c "python""
I had no luck, whatsoever. When I use that line on
cmd.exe
, the correct MSYS2 Python executable is launched.Workaround:
C:\\msys64\\msys2_shell.cmd -defterm -here -no-start -ucrt64 -c "python"
from aboveBut that workaround is pretty annoying..
Am I doing something wrong here? Or could my workaround be streamlined / be made unneccessary?
The text was updated successfully, but these errors were encountered: