Skip to content

Can not load python virtual environment #25688

Closed

Description

Type: Bug

When i select python environment, nothing happened. I can not run my .py and .ipynb files

VS Code version: Code 1.107.0 (618725e67565b290ba4da6fe2d29f8fa1d4e3622, 2025-12-10T07:43:47.883Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-14600K (20 x 3494)
GPU Status 2d_canvas: enabled
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
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.77GB (19.35GB free)
Process Argv --crash-reporter-id 83d08008-2422-4789-add0-14a486f5735f
Screen Reader no
VM 0%
Extensions (14)
Extension Author (truncated) Version
copilot-chat Git 0.35.0
debugpy ms- 2025.18.0
python ms- 2025.21.2025121701
vscode-pylance ms- 2025.10.4
vscode-python-envs ms- 1.14.0
jupyter ms- 2025.9.1
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.3.0
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
cmake-tools ms- 1.21.36
cpptools ms- 1.30.0
cpptools-extension-pack ms- 1.3.1
markdown-all-in-one yzh 3.6.3

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vswsl492:30256859
pythonvspyt551:31249599
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31436602
aj953862:31281341
nes-set-on:31351930
6abeh943:31336334
cloudbuttont:31379625
todos-1:31405332
3efgi100_wstrepl:31403338
trigger-command-fix:31379601
use-responses-api:31390855
ddidtcf:31399634
je187915:31407605
d5i5i512:31428709
ec5jj548:31422691
terminalsuggestenabled:31431119
cmp-ext-treat:31426748
cp_cls_c_966_ss:31435507
copilot6169-t2000-control:31431385
c0683394:31419495
478ah919:31426797
ge8j1254_inline_auto_hint_haiku:31427726
nes-undo-2:31426804
a5gib710:31434435
38bie571_auto:31426784
request_with_suggest:31435827
rename_enabled:31436409
7a04d226_do_not_restore_last_panel_session:31434268
anthropic_thinking_t:31432745
31c7i317_no_change:31434515
cp_cls_c_1081:31433293
copilot-nes-callisto-trt:31434412
nes-jmp-himalia-001:31437105

Activity

  1. DakotaB75 commented on Dec 20, 2025

    @DakotaB75

    Thanks for reporting this.

    When selecting a Python environment and nothing happens (no execution, no kernel attach), this is often related to one of these areas:

    • Environment discovery failing (venv not detected correctly)
    • Interpreter path resolved, but activation or launch failing silently
    • Broken or incomplete Python installation on Windows
    • Extension state corruption after updates

    To help narrow this down, could you please share:

    1. How the environment was created (python -m venv, Conda, Poetry, uv, etc.)
    2. The full output of Python: Show Output (select Python and Python Locator)
    3. Whether python --version works in an external terminal (outside VS Code)
    4. The exact path of the selected interpreter shown in VS Code
    5. Whether this happens for both .py files and notebooks, or only one

    On Windows, similar symptoms have also been caused by:

    • Missing VC++ runtime
    • Stale interpreter cache
    • VS Code launched from a different environment context

    Clearing the interpreter cache and reloading the window sometimes helps:

    • Python: Clear Workspace Interpreter Setting
    • Developer: Reload Window

    With logs, this should be reproducible.

  2. ducnguyen998 commented on Dec 21, 2025

    @ducnguyen998
    Author

    Thank you, i have fixed it by reinstall python extension in vs code.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage-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

      Issue actions