uv's Windows launchers in ~/.local/bin are reported as duplicate global Pythons
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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):

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:
- On Windows, install uv and run
uv python install 3.13 --defaultsopython.exe,python3.exe, andpython3.13.exeexist in%USERPROFILE%\.local\bin, with that folder onPATH. - Run
pet find --json; verify a single environment: kindUv,%APPDATA%\uv\python\cpython-3.13.x-…\python.exe. - Run
pet resolve %USERPROFILE%\.local\bin\python3.13.exe --json; verify it returns that sameUvenvironment. - In VS Code (with microsoft/vscode-python-environments#1877), verify the interpreter appears once, under Global.
- Remove
~/.local/binfromPATHand rerunpet find; verify theUvenvironment is still reported.
Found by Copilot
- Vorherrschende Sprache
- Rust
- Sterne
- 207
- Forks
- 45
- Ø Merge
- 1 T. 4 Std.
- Gemergte PRs (30 T.)
- 18
Entwicklungsumgebung
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
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/python-environment-tools
-
pet server logs warnings as ANSI-colored stderr, shown as errorsEvtl. vergeben @karthiknadig hat das vor 2 Tagen übernommen. Offenbug
microsoft/python-environment-tools#571 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Free-threaded python3.13t interpreters are not discovered on LinuxEvtl. vergeben @karthiknadig hat das vor 2 Tagen übernommen. Offenbug
microsoft/python-environment-tools#569 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
microsoft/python-environment-tools#537 ·
Maintainer antworten meist innerhalb von 1 Tag
-
debt
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
microsoft/python-environment-tools#538 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
microsoft/python-environment-tools#539 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/python-environment-tools
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
bmander/geomsolver#118 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Three Windows builds are keyed on a later release than their layoutEvtl. vergeben @ero-qt hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 95/100
Maintainer antworten meist innerhalb von 1 Tag
-
Markdown Preview Fonts Don't Show Selected OptionEvtl. vergeben @RadhiRasho hat das heute übernommen. Offenstate:needs triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 61/100
zed-industries/zed#65300 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
Maintainer antworten meist innerhalb von 1 Tag