microsoft / microsoft/vscode-python-environments

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

オープン
#1,468 コメント 7 件 リアクション 2 件 担当者 1 名 GitHub で見る

@eleanorjboyd がすでに取り組んでいます。

2026年4月23日 から。

triage-needed
主要言語
TypeScript
スター
138
フォーク
62
平均マージ
1日 4時間
マージ済み PR(30日)
35

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。