Environment
Version: 1.120.0 (user setup)
Commit: 0958016b2af9f09bb4257e0df4a95e2f90590f9f
Date: 2026-05-12T20:17:22Z
Electron: 39.8.8
ElectronBuildId: 13870025
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
- Python extension version: v2026.4.0
- MSYS2 installation: C:\msys64, UCRT64 environment, with python 3.14.5
- Python path:
C:\msys64\ucrt64\bin\python.exe
Current Behaviour
- I have set up a terminal profile in settings.json that launches MSYS2 bash/zsh for UCRT64.
- I selected the MSYS2 Python interpreter as my workspace interpreter.
- When I press the "Run Python File" button (or start debugging), the Python extension:
- Opens a PowerShell terminal instead of my MSYS2 bash profile.
- Invokes the Python interpreter using Windows‑style paths (e.g.
C:/Users/.../script.py).
- Even if I manually open an MSYS2 terminal and run commands, the extension ignores it and creates a new PowerShell terminal.
Desired Behaviour
When the active Python interpreter is inside an MSYS2 environment (or more generally, a Cygwin‑derived environment like MSYS2), the Python extension should:
- Automatically use the shell that belongs to that environment (bash, zsh, etc.) to run the Python command (Or configurable).
- Prefer Unix‑style paths (e.g.
/ucrt64/bin/python instead of C:\msys64\ucrt64\bin\python.exe) when executing commands (under the MSYS2 shell).
- Optionally, allow the user to associate a specific terminal profile with a given interpreter path, so that MSYS2 Python always starts in the MSYS2 bash profile.
This would make the development experience feel much closer to Linux, which is a primary reason to use MSYS2’s UCRT64 environment.
Possible implementation ideas
- Introduce an option like
python.terminal.activateProfile that can be set per‑interpreter (or mapped by interpreter path pattern).
- Or, detect when an interpreter lives under an MSYS2/Cygwin root, and automatically start the appropriate shell (e.g. by detecting
msys2_shell.cmd or the MSYSTEM environment variable).
Related issues
#22277 #24707 et. al show some requests on msys2, and there are lots of people using msys2 from all the issues.
Environment
C:\msys64\ucrt64\bin\python.exeCurrent Behaviour
C:/Users/.../script.py).Desired Behaviour
When the active Python interpreter is inside an MSYS2 environment (or more generally, a Cygwin‑derived environment like MSYS2), the Python extension should:
/ucrt64/bin/pythoninstead ofC:\msys64\ucrt64\bin\python.exe) when executing commands (under the MSYS2 shell).This would make the development experience feel much closer to Linux, which is a primary reason to use MSYS2’s UCRT64 environment.
Possible implementation ideas
python.terminal.activateProfilethat can be set per‑interpreter (or mapped by interpreter path pattern).msys2_shell.cmdor theMSYSTEMenvironment variable).Related issues
#22277 #24707 et. al show some requests on msys2, and there are lots of people using msys2 from all the issues.