microsoft / microsoft/vscode-python-environments

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

Đang mở
#1,549 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
TypeScript
Star
138
Fork
62
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
35

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.