forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Not planned
Labels
info-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Description
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
Metadata
Metadata
Assignees
Labels
info-neededIssue requires more information from posterIssue requires more information from postertriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
lwing01 commentedon Jun 18, 2025
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).
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 thewhich python
command to check the Python interpreter path, it displays the system's Python interpreter rather than the one in the virtual environment.Manually activating the virtual environment using the command
source ./.venv/bin/activate
shows the terminal with the(.venv)(.venv)
identifier. After this, using thewhich python
command to check the Python interpreter path correctly displays the interpreter from the virtual environment.eleanorjboyd commentedon Jun 24, 2025
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 commentedon Jul 25, 2025
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!