-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pythonTerminalEnvVarActivation not working with git bash on Windows #24717
Comments
I think to know that git bash is not yet officially supported. However it'd be great to have this fixed. |
The That experiment also breaks cases where something runs post activation. So, highly likely it is getting dropped. |
Thanks for the heads-up. Any plans for a successor already? |
Yes, in the works. In really early stages right now. https://github.com/microsoft/vscode-python-environments |
Here is a workaround microsoft/vscode#240539 and a fix microsoft/vscode#240614. |
Type: Bug
Behaviour
When opening a Git Bash with a virtual python env supposed to be activated on Windows which "pythonTerminalEnvVarActivation" is enabled, it mostly won't work. It looks like there's an issue with the path translation. For me, I have the repositories located on
c:\repositories
. During path resolution it seems like the\r
gets interpreted as a .echo $PATH
will look like this :epositories/c/Users/schwaerz/home/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/schwaerz/home/bin
If I rename the
c:\repositories
folder, it still won't work as$PATH
contains backslashes.If I disable the experiment, the venv integration will work. However other plug-ins which need the integration (in my case: vsconan) will break.
Steps to reproduce:
pythonTerminalEnvVarActivation
experiment is enabled (which is the default if telemetry is enabled)echo $PATH
andwhich python
. It will be wrong / brokenDiagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.23.2025011301
VS Code version: Code 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Windows_NT x64 10.0.26100
Modes:
python.languageServer
setting: PylanceUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
The text was updated successfully, but these errors were encountered: