Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv python install --preview fails with two patch versions in the same minor version #9601

Closed
jooon opened this issue Dec 3, 2024 · 2 comments · Fixed by #9607
Closed

uv python install --preview fails with two patch versions in the same minor version #9601

jooon opened this issue Dec 3, 2024 · 2 comments · Fixed by #9607
Assignees
Labels
bug Something isn't working

Comments

@jooon
Copy link
Contributor

jooon commented Dec 3, 2024

$ uv --version
uv 0.5.5 (b7564f403 2024-12-03)
$ uv python uninstall --all
Searching for Python installations
No Python installations found
$ ls -l ~/.local/bin/python*
ls: cannot access '/home/jon/.local/bin/python*': No such file or directory
$ uv python install --preview 3.12.7 3.12.6
Installed 2 versions in 7.15s
 + cpython-3.12.6-linux-x86_64-gnu (python3.12)
 + cpython-3.12.7-linux-x86_64-gnu
error: Failed to install cpython-3.12.7-linux-x86_64-gnu
  Caused by: Executable already exists at `/home/jon/.local/bin/python3.12` but is not managed by uv; use `--force` to replace it
@jooon
Copy link
Contributor Author

jooon commented Dec 3, 2024

Correct behavior IMHO is to pick the highest patch version within the minor version. This matches what happens when you install them one by one.

Install symlink for 3.12.6, then upgrade the symlink to 3.12.7

$ uv python uninstall --all
Searching for Python installations
No Python installations found
$ uv python install --preview 3.12.6
Installed Python 3.12.6 in 4.01s
 + cpython-3.12.6-linux-x86_64-gnu (python3.12)
$ uv python install --preview 3.12.7
Installed Python 3.12.7 in 3.91s
 + cpython-3.12.7-linux-x86_64-gnu (python3.12)

Install symlink for 3.12.7, then keep it when installing 3.12.6

$ uv python uninstall --all
Searching for Python installations
Uninstalled 2 versions in 58ms
 - cpython-3.12.6-linux-x86_64-gnu
 - cpython-3.12.7-linux-x86_64-gnu (python3.12)
$ uv python install --preview 3.12.7
Installed Python 3.12.7 in 3.69s
 + cpython-3.12.7-linux-x86_64-gnu (python3.12)
$ uv python install --preview 3.12.6
Installed Python 3.12.6 in 3.64s
 + cpython-3.12.6-linux-x86_64-gnu

@jooon jooon changed the title uv python install --preview fails with same minor version uv python install --preview fails with two patch versions in the same minor version Dec 3, 2024
@zanieb zanieb self-assigned this Dec 3, 2024
@zanieb
Copy link
Member

zanieb commented Dec 3, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants