Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

uv's Windows launchers in ~/.local/bin are reported as duplicate global Pythons

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

Maintainer thường phản hồi trong vòng 1 ngày

@karthiknadig đang làm issue này rồi.

Từ ngày 5/10/2026.

  • #568 của @karthiknadig — đang mở

Đánh giá

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

Mô tả

bug

Problem: On Windows, uv python install creates launcher executables (python.exe, python3.exe, python3.13.exe) in ~/.local/bin, which uv puts on PATH. PET reports each launcher as a separate GlobalPaths environment in addition to the Uv installation they launch, so a single interpreter appears four times in VS Code's environment list and picker.

The launchers are trampolines, not symlinks. When PET spawns one, it reports uv's minor-version junction (%APPDATA%\uv\python\cpython-3.13-windows-x86_64-none) as sys.prefix. Uv::try_from_managed_install only looked at the executable path and returned None for junction prefixes, so the launchers fell through to GlobalPaths.

> pet find --json        (uv's ~/.local/bin on PATH)
Uv           3.13.15          %APPDATA%\uv\python\cpython-3.13.15-windows-x86_64-none\python.exe
GlobalPaths  3.13.15.final.0  %USERPROFILE%\.local\bin\python.exe
GlobalPaths  3.13.15.final.0  %USERPROFILE%\.local\bin\python3.13.exe
GlobalPaths  3.13.15.final.0  %USERPROFILE%\.local\bin\python3.exe

Environment: Windows 11, PET main @ 4ca7c03, uv 0.12.17, CPython 3.13.15 via uv python install 3.13 --default.

Before (VS Code):

Before: one interpreter listed four times

Related: MSYS2 (microsoft/vscode-python-environments#1876) and the python.org Python Install Manager (%LOCALAPPDATA%\Python\bin aliases) are other Windows launchers that PET does not group with the installation they start; Windows find_symlinks is still a stub.

Steps to verify fix:

  1. On Windows, install uv and run uv python install 3.13 --default so python.exe, python3.exe, and python3.13.exe exist in %USERPROFILE%\.local\bin, with that folder on PATH.
  2. Run pet find --json; verify a single environment: kind Uv, %APPDATA%\uv\python\cpython-3.13.x-…\python.exe.
  3. Run pet resolve %USERPROFILE%\.local\bin\python3.13.exe --json; verify it returns that same Uv environment.
  4. In VS Code (with microsoft/vscode-python-environments#1877), verify the interpreter appears once, under Global.
  5. Remove ~/.local/bin from PATH and rerun pet find; verify the Uv environment is still reported.

Found by Copilot

Ngôn ngữ chính
Rust
Star
207
Fork
45
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
18

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có 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.

Issue khác của microsoft/python-environment-tools

Tất cả issue của microsoft/python-environment-tools

Issue tương tự

Thêm issue về Rust

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.