Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#567 1 comentario 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@karthiknadig ya está trabajando en esto.

Desde el 5/10/2026.

  • #568 de @karthiknadig — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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

Lenguaje dominante
Rust
Estrellas
207
Forks
45
Merge medio
1 d 4 h
PR fusionados (30 d)
18

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de microsoft/python-environment-tools

Todos los issues de microsoft/python-environment-tools

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.