-
Notifications
You must be signed in to change notification settings - Fork 913
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
Incorrect sysconfig in uv-managed Python installation #7369
Comments
Relatively simple patching go a long way and fixes many packages (as a start, patch CC and LIBDIR), but there is no obvious or perfect solution Missing knowledge:
Because there is no perfect solution, it's probably good go an experimental path:
|
This proposed PEP is a little bit relevant for this issue |
Going to track improvements to this in #8429 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
uv platform: macOS arm64
uv version:
0.4.9 (77d278f68 2024-09-10)
The
sysconfig
module is used bypyo3
(and other tools) to discover information about the Python distribution. For example, https://pyo3.rs/v0.14.2/building_and_distribution.html?highlight=pyo3_python#configuring-the-python-version:In a system-managed Python installation,
LIBDIR
in sysconfig correctly points to the installation's lib dir:In a uv-managed Python installation,
LIBDIR
is set to a non-existent directory:It should probably point to something like
$HOME/Library/Application Support/uv/python/cpython-3.12.3-macos-aarch64-none/install/lib
.The incorrect
LIBDIR
causes some issues when usingpyo3
+cargo test
in a uv virtual environment. I can work around it by messing around withPYTHONPATH
, but it would be good to have consistent behavior across system-managed and uv-managed Python installations.Related: https://github.com/bluss/sysconfigpatcher
The text was updated successfully, but these errors were encountered: