-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Type: Bug
Normally, python extension should not be activated in this case, as it will affect the programming experience of other language projects. The reason why I installed the python extension but not the python environment is because I log in to the same account on my two computers, and the extensions will be synchronized, one computer needs the python environment and the other computer does not.
Behaviour
The extension is activated and prompts "No Python found. Would you like to install uv and use it to install Python? This will download and run an installer from https://astral.sh."
Steps to reproduce:
- prepare a computer without python environment installed
- create a folder and open it with vscode
- Run > Add Configration
- wait for a while
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
2026-03-01 21:02:43.482 [info] Native locator: Refresh started
2026-03-01 21:02:43.496 [info] Native locator: Refresh started
2026-03-01 21:02:43.501 [info] Skipping ActivatedEnv Detection: process.env.VSCODE_CLI !== '1'
2026-03-01 21:02:43.502 [info] Skipping ActivatedEnv Detection: process.env.VSCODE_CLI !== '1'
2026-03-01 21:02:43.520 [info] > pyenv which python
2026-03-01 21:02:43.520 [info] cwd: .
2026-03-01 21:02:43.522 [info] > pyenv which python
2026-03-01 21:02:43.522 [info] cwd: .
2026-03-01 21:02:43.580 [info] Native locator: Refresh finished in 196 ms
2026-03-01 21:02:43.600 [info] > python -c "import sys;print(sys.executable)"
2026-03-01 21:02:43.769 [error] [Error: Command failed: python -c "import sys;print(sys.executable)"
at genericNodeError (node:internal/errors:983:15)
at wrappedFn (node:internal/errors:537:14)
at ChildProcess.exithandler (node:child_process:418:12)
at ChildProcess.emit (node:events:531:35)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1101:16)
at ChildProcess._handle.onexit (node:internal/child_process:304:5)] {
code: 9009,
killed: false,
signal: null,
cmd: 'python -c "import sys;print(sys.executable)"'
}
2026-03-01 21:02:45.454 [info] 正在启动 Pylance 语言服务器。
2026-03-01 21:02:45.470 [info] > python -c "import sys;print(sys.executable)"Extension version: 2026.2.0
VS Code version: Code 1.109.5 (072586267e68ece9a47aa43f8c108e0dcbf44622, 2026-02-19T19:43:32.382Z)
OS version: Windows_NT x64 10.0.26200
Modes:
- Python version (& distribution if applicable, e.g. Anaconda):
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Unknown
- Value of the
python.languageServersetting: Default
User Settings
languageServer: "Pylance"
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| add-to-git-ignore | djl | 1.0.1 |
| black-formatter | ms- | 2025.2.0 |
| code-django | alm | 1.0.0 |
| codegeex | AMi | 2.27.6 |
| cpptools-themes | ms- | 2.0.0 |
| dart-code | Dar | 3.128.0 |
| debugpy | ms- | 2025.18.0 |
| flutter | Dar | 3.128.0 |
| i18n-ally | lok | 2.13.1 |
| isort | ms- | 2025.0.0 |
| js-debug | ms- | 1.105.0 |
| js-debug-companion | ms- | 1.1.3 |
| luo2430-icon-theme | luo | 0.0.3 |
| mark-jump | spy | 0.9.0 |
| output-colorizer | IBM | 0.1.2 |
| path-autocomplete | ion | 1.25.0 |
| playwright | ms- | 1.1.17 |
| powershell | ms- | 2025.4.0 |
| prettier-vscode | esb | 12.3.0 |
| project-manager | ale | 13.0.1 |
| python | ms- | 2026.2.0 |
| reload | nat | 0.0.7 |
| text-power-tools | qcz | 1.51.0 |
| todo-tree | Gru | 0.0.226 |
| tsl-problem-matcher | amo | 0.6.2 |
| vscode-eslint | dba | 3.0.20 |
| vscode-gutter-preview | kis | 0.32.2 |
| vscode-jetbrains-icon-theme | cha | 2.39.0 |
| vscode-js-profile-table | ms- | 1.0.10 |
| vscode-language-pack-zh-hans | MS- | 1.108.2026021109 |
| vscode-pylance | ms- | 2026.1.1 |
| vscode-python-envs | ms- | 1.20.1 |
| vscode-sort-package-json | uni | 1.5.4 |
| vscode-yaml | red | 1.21.0 |
System Info
| Item | Value |
|---|---|
| CPUs | 12th Gen Intel(R) Core(TM) i9-12900HX (24 x 2496) |
| GPU Status | 2d_canvas: enabled GPU0: VENDOR= 0x10de, DEVICE=0x2420 [NVIDIA GeForce RTX 3080 Ti Laptop GPU], DRIVER_VENDOR=NVIDIA, DRIVER_VERSION=32.0.15.9159 ACTIVE GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.7309 Machine model name: Machine model version: 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) | 63.77GB (49.62GB free) |
| Process Argv | --crash-reporter-id 9170a7cb-0217-4509-9d11-4c5bca343af5 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vswsl492cf:30256860
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsdeactivate2:31464701
cloudbuttont:31379625
aihoversummaries_f:31469309
42190218_ostrepl:31403339
bj468946:31457056
use-responses-api:31390855
ddidtcf:31399634
ec5jj548:31422691
cp_cls_c_966_ss:31454199
4je02754:31466945
a5gib710:31434435
7a04d226_do_not_restore_last_panel_session:31438103
cp_cls_c_1081:31454833
a43f0575b:31442825
e9c30283:31461165
idci7584:31464702
edit_mode_hidden:31461530
864ei723_large_tool_results_to_disk:31460878
showingstats:31457202
chat:31457767