microsoft / microsoft/vscode-python-environments

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

Open
#1,549 0 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
138
Forks
62
Avg merge
1d 4h
Merged PRs (30d)
35

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.