microsoft / microsoft/vscode-python-environments

VS Code not selecting environment in .venv/ on open with Environments extension installed

Aberta
#1,468 7 comentários 2 reações 1 responsável Ver no GitHub

@eleanorjboyd já está trabalhando nisso.

Desde 23/4/2026.

triage-needed
Linguagem predominante
TypeScript
Estrelas
138
Forks
62
Merge médio
1d 4h
PRs com merge (30d)
35

Descrição

On Mac OS with the Python & Python Environments extensions installed, VS Code is failing to automatically activate a virtual environment in the .venv/ folder of the project when opened via code . in the terminal, or via opening the folder via the UI.

Despite being present in the Select Python Environment List.

Image

.venv is present in the Python-envs: Workspace Search Paths setting.

Image

To reproduce:

➜  projects uv init pyenvtest
Initialized project `pyenvtest` at `/Users/nina/projects/pyenvtest`
➜  projects cd pyenvtest
➜  pyenvtest git:(main) ✗ uv venv
Using CPython 3.14.4 interpreter at: /opt/homebrew/opt/python@3.14/bin/python3.14
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
➜  pyenvtest git:(main) ✗ code .

Uninstalling the Python Environments extension fixes the issue, and the environment in .venv/ is automatically selected when VS Code opens.

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.