Repository navigation
Python native REPL ignoring workspace interpreter #992
Copy link
Copy link
Closed
microsoft/vscode-python
#25763Labels
area-environmentEnvironment, interpreter related issues.Environment, interpreter related issues.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityIssue identified as high-priority
Milestone
Description
Type: Bug
After updating VS Code today, the Python native REPL no longer uses the selected Python interpreter/virtual environment for the workspace. Instead it always uses the global default interpreter path (which you can see by running sys.executable). This is a problem because I need the native REPL to use virtual environments for specific projects.
Extension version: 2025.10.1
VS Code version: Code 1.102.2 (c306e94f98122556ca081f527b466015e1bc37b0, 2025-07-22T12:15:48.520Z)
OS version: Windows_NT x64 10.0.26100
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.13.0
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): System
- Value of the
python.languageServersetting: Default
User Settings
languageServer: "Pylance"
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| debugpy | ms- | 2025.10.0 |
| even-better-toml | tam | 0.21.2 |
| intellicode-api-usage-examples | Vis | 0.2.9 |
| java | red | 1.43.1 |
| js-debug | ms- | 1.102.0 |
| js-debug-companion | ms- | 1.1.3 |
| jupyter | ms- | 2025.6.0 |
| jupyter-keymap | ms- | 1.1.2 |
| jupyter-renderers | ms- | 1.3.0 |
| python | ms- | 2025.10.1 |
| r | REd | 2.8.6 |
| r-syntax | REd | 0.1.3 |
| rainbow-csv | mec | 3.20.0 |
| vscode-gradle | vsc | 3.16.4 |
| vscode-java-debug | vsc | 0.58.2 |
| vscode-java-dependency | vsc | 0.24.1 |
| vscode-java-pack | vsc | 0.29.2 |
| vscode-java-test | vsc | 0.43.1 |
| vscode-js-profile-table | ms- | 1.0.10 |
| vscode-jupyter-cell-tags | ms- | 0.1.9 |
| vscode-jupyter-slideshow | ms- | 0.1.6 |
| vscode-maven | vsc | 0.44.0 |
| vscode-pylance | ms- | 2025.7.1 |
| vscode-python-envs | ms- | 1.2.0 |
| vscodeintellicode | Vis | 1.3.2 |
System Info
| Item | Value |
|---|---|
| CPUs | 13th Gen Intel(R) Core(TM) i7-1365U (12 x 2688) |
| 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) | 31.67GB (16.35GB free) |
| Process Argv | --crash-reporter-id bad86640-caad-401d-8273-da88a560591e |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
2e7ec940:31000449
nativeloc1:31344060
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
hdaa2157:31222309
copilot_t_ci:31333650
e5gg6876:31282496
pythoneinst12:31285622
c7cif404:31314491
pythonpulldiag:31343502
996jf627:31283433
pythonrdcb7:31342333
usemplatestapi:31297334
0aa6g176:31307128
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
pylancequickfixf:31350060
9d2cg352:31346308
convertlamdat:31350063
usemarketplace:31343026
nesew2to5:31336538
agentclaude:31335814
nes-diff-11:31337487
replacestringexc:31350595
nes-set-on:31340697
6abeh943:31336334
envsactivate1:31353494
yijiwantestdri0626-c:31336931
0927b901:31350571
ji9b5146:31348712
45650338:31356125
0cj2b977:31352657
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-environmentEnvironment, interpreter related issues.Environment, interpreter related issues.bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityIssue identified as high-priority
Activity
anthonykim1 commentedon Aug 6, 2025
Do you get different behavior when you add
python.useEnvironmentsExtension": false,to your settings.jsongithub-actions commentedon Sep 6, 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!
jevogel commentedon Oct 23, 2025
I just encountered this issue myself. If
python.useEnvironmentsExtensionis set totrue(the default) and I open the native REPL,sys.prefixreturns/usr, implying the REPL is not running inside a virtual environment. If I set it tofalseas requested, thensys.prefixresolves to my.venvdirectory as expected.matthewgson commentedon Nov 10, 2025
I also confirmed that now vscode honors the default python interepreter path setup when
python.useEnvironmentExtension: false.anthonykim1 commentedon Nov 10, 2025
I think there has been some changes to
getActiveInterpreterto use new environment extension API recently. /cc Eleanor Boyd (@eleanorjboyd)Can you guys try with
python.useEnvironmentsExtensionto true, with the latest pre-release of env extension?We want this to work regardless of env extension presence.
vs-code-engineering commentedon Nov 10, 2025
Please diagnose the root cause of the issue by running the command
F1 > Help: Troubleshoot Issueand following the instructions. Once you have done that, please update the issue with the results.Happy Coding!
14 remaining items
Fix native repl not using env extension (microsoft#25763)