Skip to content

python interpreter selection #25210

@dietman325

Description

@dietman325

Type: Bug

I cannot activate the virtual environment created with venv in vscode.
I was able to activate it by entering the relative path of python.exe (/venv/Scripts/python.exe) in the cmdlet.

VS Code version: Code 1.101.0 (dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1, 2025-06-11T15:00:50.123Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs AMD Ryzen 5 5500 (12 x 3593)
GPU Status 2d_canvas: enabled
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
Load (avg) undefined
Memory (System) 63.89GB (54.64GB free)
Process Argv --crash-reporter-id 5ee3153f-4b37-4182-bd48-3f4e019682d7
Screen Reader no
VM 0%
Extensions (18)
Extension Author (truncated) Version
vscode-markdownlint Dav 0.60.0
gc-excelviewer Gra 4.2.63
ecdc mit 1.8.0
vscode-language-pack-ja MS- 1.101.2025061109
debugpy ms- 2025.8.0
python ms- 2025.8.0
vscode-pylance ms- 2025.6.1
remote-containers ms- 0.417.0
remote-ssh ms- 0.120.0
remote-ssh-edit ms- 0.87.0
cmake-tools ms- 1.20.53
powershell ms- 2025.0.0
remote-explorer ms- 0.5.0
roo-cline Roo 3.21.0
cmake twx 0.0.17
html-snippets wsc 1.0.6
markdown-pdf yza 1.5.0
json Zai 2.0.2
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
pythonpulldiagcf:31325931
996jf627:31283433
pythonrdcb7cf:31303019
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
9hi5e907:31325879
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
convertlamdat:31329272
0g0a1943:31327026
i851h500:31328299
useunpkg:31328953
nesew1to5:31323296
1292j425:31329156
id45c886:31329544

Activity

lwing01

lwing01 commented on Jun 18, 2025

@lwing01

vscode version: 1.101.0
python extension version: v2025.8.0

Using workspace mode, multiple code repositories are added to the same workspace, with each repository maintaining its own Python virtual environment (.venv).

  1. By using Ctrl + ` to open the terminal in a specified directory, the terminal shows the (.venv) identifier, indicating that the virtual environment is activated. However, when using the which python command to check the Python interpreter path, it displays the system's Python interpreter rather than the one in the virtual environment.

  2. Manually activating the virtual environment using the command source ./.venv/bin/activate shows the terminal with the (.venv)(.venv) identifier. After this, using the which python command to check the Python interpreter path correctly displays the interpreter from the virtual environment.

Image

eleanorjboyd

eleanorjboyd commented on Jun 24, 2025

@eleanorjboyd
Member

Hello! Could you try installing the new "python environments extension" by publisher Microsoft, reloading and seeing if that makes a difference. This is our rewrite on environment management that handles activation and may solve your issue or at least get you onto the newest code for activation.

github-actions

github-actions commented on Jul 25, 2025

@github-actions

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

Happy Coding!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @TylerLeonhardt@eleanorjboyd@lwing01@dietman325

      Issue actions

        python interpreter selection · Issue #25210 · microsoft/vscode-python