Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#567 1 comentário 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@karthiknadig já está trabalhando nisso.

Desde 5/10/2026.

  • #568 de @karthiknadig — aberto

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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

Linguagem predominante
Rust
Estrelas
207
Forks
45
Merge médio
1d 4h
PRs com merge (30d)
18

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

  • Sem Dockerfile nem arquivo Docker Compose
  • Sem modelo de pull request
  • Sem guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoft/python-environment-tools

Todas as issues de microsoft/python-environment-tools

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.