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 pip fails on BSD: Libc type could not be detected #3824

Closed
lcheylus opened this issue May 24, 2024 · 3 comments · Fixed by #3825
Closed

uv pip fails on BSD: Libc type could not be detected #3824

lcheylus opened this issue May 24, 2024 · 3 comments · Fixed by #3825
Assignees
Labels
bug Something isn't working

Comments

@lcheylus
Copy link

Success to build of uv version 0.2.2 on OpenBSD current/amd64 with Rust version 1.78.0:

$ uv version
uv 0.2.2

$ rustc -vV
rustc 1.78.0 (15adfb9cd 2024-04-28) (built from a source tarball)
binary: rustc
commit-hash: 15adfb9cd5b029268e1470a41391d91859b0a1f8
commit-date: 2024-04-28
host: x86_64-unknown-openbsd
release: 1.78.0
LLVM version: 16.0.6

When I try to exec uv pip list command (or other pip commands), I have the following error:

$ uv pip list
error: Libc type could not be detected

After some analysis, this error seems to come from "Rewrite Python interpreter discovery" #3266. (release in version 0.2.0).

In crates/uv-interpreter/src/platform.rs file, function Libc::from_env, there is no case for BSD OD (freebsd, openbsd, netbsd), only for linux and windows | macos => Error::LibcNotDetected is returned for BSD OS.

I think this function sould return a new value Libc::BSD for BSD OS (specific libc version for this OS type, different from GNU libc).

konstin added a commit that referenced this issue May 24, 2024
Libc variants are only relevant on linux, we can ignore it on non {linux, windows, mac}.

Closes #3824
@konstin
Copy link
Member

konstin commented May 24, 2024

Could you try with #3825?

@konstin konstin self-assigned this May 24, 2024
@lcheylus
Copy link
Author

lcheylus commented May 25, 2024

OK, PR #3825 fixes this issue:

$ uv pip list
Package                       Version
----------------------------- ---------
alabaster                     0.7.16
astroid                       3.1.0
attrs                         23.2.0
autopep8                      2.0.4
(...)

Thanks @konstin for your fix.

@zanieb
Copy link
Member

zanieb commented May 25, 2024

Thank you for checking back in!

@zanieb zanieb added the bug Something isn't working label May 25, 2024
konstin added a commit that referenced this issue May 25, 2024
Libc variants are only relevant on linux, we can ignore it on non
{linux, windows, mac}, e.g. BSDs.

Closes #3824
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.

3 participants