Skip to content
New issue

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

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

Already on GitHub? # to your account

uv python list doesn't show all possible combinations of python installation #4988

Open
KhazAkar opened this issue Jul 11, 2024 · 2 comments · Fixed by #5036
Open

uv python list doesn't show all possible combinations of python installation #4988

KhazAkar opened this issue Jul 11, 2024 · 2 comments · Fixed by #5036
Labels
cli Related to the command line interface help wanted Contribution especially encouraged

Comments

@KhazAkar
Copy link

KhazAkar commented Jul 11, 2024

Hi!
When running (today installed) uv to install python locally and discover some, it doesn't show all possible options for current architecture:

$ uv python list
warning: `uv python list` is experimental and may change without warning.
cpython-3.12.3-linux-x86_64-musl     <download available>
cpython-3.12.3-linux-x86_64-gnu      /usr/bin/python3
cpython-3.12.3-linux-x86_64-gnu      /bin/python3
cpython-3.11.9-linux-x86_64-musl     <download available>
cpython-3.10.14-linux-x86_64-musl    <download available>
cpython-3.9.19-linux-x86_64-musl     <download available>
cpython-3.8.19-linux-x86_64-musl     <download available>
cpython-3.7.9-linux-x86_64-musl      <download available>

But, when you try by guess-work to install cpython-3.11.9-linux-x86_64-gnu, it works:

$ uv python install cpython-3.11.9-linux-x86_64-gnu
warning: `uv python install` is experimental and may change without warning.
Searching for Python versions matching: cpython-3.11.9-linux-x86_64-gnu
Installed Python 3.11.9 to: /home/khazakar/.local/share/uv/python/cpython-3.11.9-linux-x86_64-gnu
Installed 1 version in 3.44s

I'm running Ubuntu 24.04, uv version 0.2.24, x86_64 arch.

@zanieb
Copy link
Member

zanieb commented Jul 11, 2024

Hi! Sounds like you're looking for uv python list --all-platforms, we should add some more options like --all-libc and --all-arch

@zanieb
Copy link
Member

zanieb commented Jul 11, 2024

Sorry after looking more closely it looks like we're omitting linux-x86_64-gnu in that case as well. I think we need to add another option.

@zanieb zanieb added help wanted Contribution especially encouraged cli Related to the command line interface preview Experimental behavior labels Jul 11, 2024
zanieb pushed a commit that referenced this issue Jul 14, 2024
…5036)

Fix #4988

## Summary

Running `uv python list` on glibc-based Linux will list musl pythons.

```bash
$ uv version
uv 0.2.24
$ uv python list
warning: `uv python list` is experimental and may change without warning.
cpython-3.12.3-linux-x86_64-musl     <download available>
cpython-3.12.3-linux-x86_64-gnu      /usr/bin/python3
cpython-3.12.3-linux-x86_64-gnu      /bin/python3
cpython-3.11.9-linux-x86_64-musl     <download available>
cpython-3.10.14-linux-x86_64-musl    <download available>
cpython-3.9.19-linux-x86_64-musl     <download available>
cpython-3.8.19-linux-x86_64-musl     <download available>
cpython-3.7.9-linux-x86_64-musl      <download available>
```

Change it to show Python matching the environment's libc as follows.

```bash
$ uv python list
warning: `uv python list` is experimental and may change without warning.
cpython-3.12.3-linux-x86_64-gnu     /usr/bin/python3
cpython-3.12.3-linux-x86_64-gnu     /bin/python3
cpython-3.12.3-linux-x86_64-gnu     <download available>
cpython-3.11.9-linux-x86_64-gnu     <download available>
cpython-3.10.14-linux-x86_64-gnu    <download available>
cpython-3.9.19-linux-x86_64-gnu     <download available>
cpython-3.8.19-linux-x86_64-gnu     <download available>
cpython-3.7.9-linux-x86_64-gnu      <download available>
```

Also, if --all-platforms is specified, change to list Python for all
architectures and libc.

```bash
$ uv python list --all-platforms
warning: `uv python list` is experimental and may change without warning.
cpython-3.12.3-windows-x86_64-none       <download available>
cpython-3.12.3-windows-x86-none          <download available>
cpython-3.12.3-macos-x86_64-none         <download available>
cpython-3.12.3-macos-aarch64-none        <download available>
cpython-3.12.3-linux-x86_64-musl         <download available>
cpython-3.12.3-linux-x86_64-gnu          /usr/bin/python3
cpython-3.12.3-linux-x86_64-gnu          /bin/python3
cpython-3.12.3-linux-x86_64-gnu          <download available>
cpython-3.12.3-linux-s390x-gnu           <download available>
cpython-3.12.3-linux-powerpc64le-gnu     <download available>
cpython-3.12.3-linux-armv7-gnueabihf     <download available>
cpython-3.12.3-linux-armv7-gnueabi       <download available>
cpython-3.12.3-linux-aarch64-gnu         <download available>
...
```

## Test Plan

The following commands were executed on the command line to confirm the
results in Ubuntu 24.04.
- `cargo run python list`
- `cargo run python list --all-platforms`
@zanieb zanieb reopened this Jul 14, 2024
@zanieb zanieb removed the preview Experimental behavior label Aug 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
cli Related to the command line interface help wanted Contribution especially encouraged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants