microsoft / microsoft/vscode-python-environments

"Create Python Terminal" button doesn't work as expected

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

まだ誰も着手していません。

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

説明

## Environment data

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

## Repro Steps

1. Ensure that multiple environments are shown in the "Environment managers" list. For me, I have a bunch of venv environments in a folder added to "Global search paths".
2. Click the "Create Python Terminal" button:
* With no folder opened
* With a folder/workspace opened that doesn't have a Project Environment set
* With a folder/workspace opened that does have a Project Environment set

## Expected behavior

In all three cases, the button should open a terminal with the appropriate environment selected (i.e. the one where I clicked the button "Create Python Terminal"

## Actual behavior

With no folder opened, the button does nothing.
Otherwise, if no project environment is set, a new terminal is created with no environment activated.
And if a project environment is set, that one is always activated, regardless of which "Create Python Terminal" button was clicked

## Logs

With no folder opened: No output at all
With a folder opened:
```
2026-05-30 10:57:45.745 [debug] Environment c:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe is not activatable
```
With a folder opened that does have a project environment (the project environment is called "ProjectEnvironment", the one I wanted to activate doesn't even appear once in the log):
```
2026-05-30 10:57:58.703 [info] Python API: Changed environment from Python 3.13 (64-bit) to ProjectEnvironment (3.13.7) for: c:\Users\Lukas\Searches
2026-05-30 10:57:58.703 [info] Internal: Changed environment from Python 3.13 (64-bit) to ProjectEnvironment (3.13.7) for: c:\Users\Lukas\Searches
2026-05-30 10:58:05.614 [debug] Activating terminal: c:\Users\Lukas\venv\ProjectEnvironment\Scripts\python.exe
2026-05-30 10:58:09.626 [debug] Shell execution started: (Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned) ; (& C:\Users\Lukas\venv\ProjectEnvironment\Scripts\Activate.ps1)
2026-05-30 10:58:09.628 [debug] Checking venv (ms-python.python:venv) for c:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.628 [debug] Environment search directories: 3 paths
2026-05-30 10:58:09.629 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-05-30 10:58:09.638 [info] Resolved Python Environment C:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.639 [debug] Environment search directories: 3 paths
2026-05-30 10:58:09.642 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-05-30 10:58:09.648 [info] Resolved Python Environment C:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.650 [debug] Manager venv (ms-python.python:venv) cannot handle c:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.650 [debug] Checking PyEnv (ms-python.python:pyenv) for c:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.651 [debug] Environment search directories: 3 paths
2026-05-30 10:58:09.651 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-05-30 10:58:09.657 [info] Resolved Python Environment C:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.659 [debug] Checking Pipenv (ms-python.python:pipenv) for c:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.661 [debug] Environment search directories: 3 paths
2026-05-30 10:58:09.661 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-05-30 10:58:09.670 [info] Resolved Python Environment C:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.672 [debug] Checking Poetry (ms-python.python:poetry) for c:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.674 [debug] Environment search directories: 3 paths
2026-05-30 10:58:09.674 [debug] [pet] configure: No changes detected, skipping configuration update.
2026-05-30 10:58:09.681 [info] Resolved Python Environment C:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.683 [debug] Checking Global (ms-python.python:system) for c:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.683 [debug] Using Global (ms-python.python:system) to handle c:\Users\Lukas\AppData\Local\Programs\Python\Python313\python.exe
2026-05-30 10:58:09.922 [info] Terminal is activated: c:\Users\Lukas\venv\ProjectEnvironment\Scripts\python.exe
```

## Additional context

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

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

はじめの一歩

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

評価

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

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

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