-
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
Terminal no longer activates virtual environment for Git Bash on Windows #23008
Comments
Note Gitbash isn't supported by Python extension, so use |
Attached is a recent attempt with the pre-release versiondebug_3_1_24.txt |
I left a comment in a similar issue about a possible culprit. My repo is located at D:\Code\python\temp, and I have the pre-release version of the Python extension. Git Bash activates venv as expected:
Show environment contributions
Git Bash doesn't activate venv:
Show environment contributions
The issue seems to stem from faulty $PATH formation, specifically the part |
@kyrlon It still looks like Git bash is selected as default profile, also the logs don't seem to be set to "debug" level as requested earlier. Please follow these instructions and upload the logs, and we'll be happy to have a look. @monk-time Git bash isn't supported by Python extension, try switching to some other shell and create a new issue #23008 (comment) if the problem reoccurs. |
Type: Bug
Behaviour
Expected vs. Actual
It's been some time since I actively worked with Python and virtual environments (venv) on Windows. There have been several updates since I last remember. Previously, upon selecting a virtual environment (venv), the terminal would automatically activate the virtual environment and display its current environment. However, in my current setup with VSCode and Python extension version
v2024.2.1
, I noticed a change in this behavior. I'm uncertain when this alteration occurred, so I reverted back to an older version from a couple of years ago,v2021.10.1365161279
. You can observe below how the activation process used to function withcmd
andPowershell
:This gif below showcases the activation with
cmd
andgit bash
:Similar post: #22822
Steps to reproduce:
py -m venv [NAME OF VENV]
.Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2024.2.1
VS Code version: Code 1.86.2 (903b1e9d8990623e3d7da1df3d33db3e42d80eda, 2024-02-13T19:40:56.878Z)
OS version: Windows_NT x64 10.0.19045
Modes:
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
A/B Experiments
The text was updated successfully, but these errors were encountered: