The error:
dyld[90807]: Library not loaded: /install/lib/libpython3.13.dylib
Referenced from: <A73153CF-70A5-379B-B9D3-526153D8322F> repro/target/debug/deps/setup-29f3c899bfb488ef
Reason: tried: '/install/lib/libpython3.13.dylib' (no such file), 'repro/target/debug/deps/libpython3.13.dylib' (no such file), 'repro/target/debug/libpython3.13.dylib' (no such file), '.rustup/toolchains/stable-aarch64-
apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/libpython3.13.dylib' (no such file), '.rustup/toolchains/stable-aarch64-apple-darwin/lib/libpython3.13.dylib' (no such file), '/Users/luca/lib/libpyt
hon3.13.dylib' (no such file), '/usr/local/lib/libpython3.13.dylib' (no such file), '/usr/lib/libpython3.13.dylib' (no such file, not in dyld cache)
error: test failed, to rerun pass `--libHow to reproduce:
- Create the project virtual environment:
uv sync --all-packages - Option 1: force
pyo3to use the uv-provided Python interpreter, from the project virtual environment:PYO3_PYTHON="${PWD}/.venv/bin/python3" cargo t - Option 2: activate the project virtual environment first, then run the tests:
source .venv/bin/activate # `pyo3` will now pick up the Python interpreter from the virtual environment cargo t
Both options should fail with the error reported above.
Tested with:
cargo 1.84.0 (66221abde 2024-11-19)uv 0.5.18 (27d1bad55 2025-01-11)- Operating system:
ProductName: macOS ProductVersion: 14.5 BuildVersion: 23F79