Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen
#567 1 Kommentar 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@karthiknadig arbeitet bereits daran.

Seit 05.10.2026.

  • #568 von @karthiknadig — offen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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

Vorherrschende Sprache
Rust
Sterne
207
Forks
45
Ø Merge
1 T. 4 Std.
Gemergte PRs (30 T.)
18

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Keine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoft/python-environment-tools

Alle Issues in microsoft/python-environment-tools

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.