microsoft / microsoft/vscode-python-environments

Cannot select venv environment

Ouverte
#1,718 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@karthiknadig y travaille déjà.

Depuis le 18/8/2026.

area-environment bug
Langage dominant
TypeScript
Étoiles
138
Forks
62
Merge moyen
1 j 4 h
PR mergées (30 j)
35

Description

## Environment data

Windows

Version: 1.133.0 (user setup)
Commit: a5b500951314efd502d07465bd138dfbd714a960
Date: 2026-08-11T22:14:08Z
Electron: 42.8.0
ElectronBuildId: 14845705
Chromium: 148.0.7778.280
Node.js: 24.18.0
V8: 14.8.178.38-electron.0
@github/copilot: 1.0.79-6
@github/copilot-sdk: 1.0.9
OS: a5b500951314efd502d07465bd138dfbd714a960

- Python Environments extension version: 1.36.0
- Python extension (`ms-python.python`) version: 1.36.0
- VS Code version (Help → About): 1.1.33.0
- OS and version: Windows 11
- Python version (& distribution if applicable, e.g. Anaconda): 3.13
- Environment manager in use (`venv` / `conda` / `pyenv` / `poetry` / `pipenv` / `system` / `uv` / other): venv
- Shell (bash / zsh / fish / pwsh / cmd / other): cmd
- Remote / container scenario (none / WSL / SSH Remote / Dev Container / Codespaces): none
- Workspace type (single folder / multi-root / mono-repo): single folder
- Is this a regression? If yes, last known working extension version: unknown

## Repro Steps

Try to select a venv environment outside of the workspace folder.

## Expected behavior

The Python interpreter is selected

## Actual behavior

Error message:

```
Selected file is not a valid Python interpreter: c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
```

And it's falling back to the global Python installation instead.

## Logs

Tried this several time, starting 09:49 is with trace level.

```
2026-08-18 09:51:37.254 [debug] Checking venv (ms-python.python:venv) for c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.255 [debug] Environment search directories: 2 paths
2026-08-18 09:51:37.255 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-08-18 09:51:37.287 [error] [pet]  784.057678400s ERROR pet_python_utils::env: Python Execution for "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe" produced an output "" without a separator
 784.057767700s ERROR pet::jsonrpc: Failed to resolve env "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe", returning discovered env PythonEnvironment { display_name: None, name: None, executable: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"), kind: Some(Venv), version: None, prefix: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv"), manager: None, project: None, arch: None, symlinks: Some(["c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"]), error: None }

2026-08-18 09:51:37.288 [info] Resolved Python Environment c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.288 [debug] Failed to resolve venv env "c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe": Error: Invalid python info: {"arch":null,"displayName":null,"error":null,"executable":"c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe","kind":"Venv","manager":null,"name":null,"prefix":"c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv","project":null,"symlinks":["c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"],"version":null}
2026-08-18 09:51:37.290 [debug] Environment search directories: 2 paths
2026-08-18 09:51:37.290 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-08-18 09:51:37.322 [error] [pet]  784.092843600s ERROR pet_python_utils::env: Python Execution for "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe" produced an output "" without a separator
 784.092869400s ERROR pet::jsonrpc: Failed to resolve env "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe", returning discovered env PythonEnvironment { display_name: None, name: None, executable: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"), kind: Some(Venv), version: None, prefix: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv"), manager: None, project: None, arch: None, symlinks: Some(["c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"]), error: None }

2026-08-18 09:51:37.323 [info] Resolved Python Environment c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.325 [debug] Manager venv (ms-python.python:venv) cannot handle c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.325 [debug] Checking PyEnv (ms-python.python:pyenv) for c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.325 [debug] Environment search directories: 2 paths
2026-08-18 09:51:37.325 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-08-18 09:51:37.358 [error] [pet]  784.128602000s ERROR pet_python_utils::env: Python Execution for "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe" produced an output "" without a separator
 784.128635200s ERROR pet::jsonrpc: Failed to resolve env "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe", returning discovered env PythonEnvironment { display_name: None, name: None, executable: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"), kind: Some(Venv), version: None, prefix: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv"), manager: None, project: None, arch: None, symlinks: Some(["c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"]), error: None }

2026-08-18 09:51:37.358 [info] Resolved Python Environment c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.359 [debug] Checking Pipenv (ms-python.python:pipenv) for c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.360 [debug] Environment search directories: 2 paths
2026-08-18 09:51:37.361 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-08-18 09:51:37.423 [error] [pet]  784.193347300s ERROR pet_python_utils::env: Python Execution for "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe" produced an output "" without a separator
 784.193374500s ERROR pet::jsonrpc: Failed to resolve env "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe", returning discovered env PythonEnvironment { display_name: None, name: None, executable: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"), kind: Some(Venv), version: None, prefix: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv"), manager: None, project: None, arch: None, symlinks: Some(["c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"]), error: None }

2026-08-18 09:51:37.427 [info] Resolved Python Environment c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.428 [debug] Checking Poetry (ms-python.python:poetry) for c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.429 [debug] Environment search directories: 2 paths
2026-08-18 09:51:37.429 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-08-18 09:51:37.461 [error] [pet]  784.232215300s ERROR pet_python_utils::env: Python Execution for "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe" produced an output "" without a separator
 784.232244000s ERROR pet::jsonrpc: Failed to resolve env "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe", returning discovered env PythonEnvironment { display_name: None, name: None, executable: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"), kind: Some(Venv), version: None, prefix: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv"), manager: None, project: None, arch: None, symlinks: Some(["c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"]), error: None }

2026-08-18 09:51:37.462 [info] Resolved Python Environment c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.463 [debug] Checking Global (ms-python.python:system) for c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.464 [debug] Environment search directories: 2 paths
2026-08-18 09:51:37.464 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-08-18 09:51:37.495 [error] [pet]  784.266021000s ERROR pet_python_utils::env: Python Execution for "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe" produced an output "" without a separator
 784.266048100s ERROR pet::jsonrpc: Failed to resolve env "c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe", returning discovered env PythonEnvironment { display_name: None, name: None, executable: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"), kind: Some(Venv), version: None, prefix: Some("c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv"), manager: None, project: None, arch: None, symlinks: Some(["c:\\svn\\modules\\reporting\\trunk\\lrs_lra\\venv\\Scripts\\python.exe"]), error: None }

2026-08-18 09:51:37.496 [info] Resolved Python Environment c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe
2026-08-18 09:51:37.497 [warning] Unable to handle c:\svn\modules\reporting\trunk\lrs_lra\venv\Scripts\python.exe

```

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.