uv: uv installing for incorrect architecture (raspberry pi)
Summary
Running uv with any python version that is not 3.9 (system default) will result in a “Cannot open shared object file: No such file or directory” error.
Here are some logs that demonstrate the issue:
yucjo@raspberrypi ~/workspace/projects/ main
❯ uv -v run --python 3.9 python --version
DEBUG uv 0.7.2
DEBUG No project found; searching for Python interpreter
DEBUG Searching for Python 3.9 in virtual environments, managed installations, or search path
DEBUG Searching for managed installations at `/home/yucjo/.local/share/uv/python`
DEBUG Skipping incompatible managed installation `cpython-3.12.10-linux-armv7-gnueabi`
DEBUG Skipping incompatible managed installation `cpython-3.11.12-linux-armv7-gnueabi`
DEBUG Skipping incompatible managed installation `cpython-3.10.17-linux-armv7-gnueabi`
DEBUG Found `cpython-3.9.2-linux-armv7-gnu` at `/usr/bin/python3.9` (first executable in the search path)
DEBUG Using Python 3.9.2 interpreter at: /usr/bin/python3.9
DEBUG Running `python --version`
DEBUG Spawned child 20442 in process group 20439
Python 3.9.2
DEBUG Command exited with code: 0
yucjo@raspberrypi ~/workspace/projects/ main
❯ uv -v run --python 3.10 python --version
DEBUG uv 0.7.2
DEBUG No project found; searching for Python interpreter
DEBUG Searching for Python 3.10 in virtual environments, managed installations, or search path
DEBUG Searching for managed installations at `/home/yucjo/.local/share/uv/python`
DEBUG Skipping incompatible managed installation `cpython-3.12.10-linux-armv7-gnueabi`
DEBUG Skipping incompatible managed installation `cpython-3.11.12-linux-armv7-gnueabi`
DEBUG Found managed installation `cpython-3.10.17-linux-armv7-gnueabi`
DEBUG Failed to inspect Python interpreter from managed installations at `/home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/python3.10`
DEBUG Skipping bad interpreter at /home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/python3.10 from managed installations: Querying Python at `/home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/python3.10` failed with exit status exit status: 127
[stderr]
/home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/python3.10: error while loading shared libraries: /home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/../lib/libpython3.10.so.1.0: cannot open shared object file: No such file or directory
DEBUG Found `cpython-3.9.2-linux-armv7-gnu` at `/usr/bin/python3` (first executable in the search path)
DEBUG Skipping interpreter at `/usr/bin/python3` from first executable in the search path: does not satisfy request `3.10`
DEBUG Found `cpython-3.9.2-linux-armv7-gnu` at `/usr/bin/python` (search path)
DEBUG Skipping interpreter at `/usr/bin/python` from search path: does not satisfy request `3.10`
DEBUG Skipping bad interpreter at /home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/python3.10 from managed installations: Querying Python at `/home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/python3.10` failed with exit status exit status: 127
[stderr]
/home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/python3.10: error while loading shared libraries: /home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/../lib/libpython3.10.so.1.0: cannot open shared object file: No such file or directory
DEBUG Requested Python not found, checking for available download...
DEBUG Acquired lock for `/home/yucjo/.local/share/uv/python`
DEBUG Using request timeout of 30s
INFO Fetching requested Python...
DEBUG Released lock at `/home/yucjo/.local/share/uv/python/.lock`
error: Querying Python at `/home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/python3.10` failed with exit status exit status: 127
[stderr]
/home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/python3.10: error while loading shared libraries: /home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/../lib/libpython3.10.so.1.0: cannot open shared object file: No such file or directory
The libraries are clearly present:
yucjo@raspberrypi ~/workspace/projects/ main
❯ l /home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/../lib/libpython3.10.so.1.0
-rwxr-xr-x 1 yucjo yucjo 21M May 5 00:29 /home/yucjo/.local/share/uv/python/cpython-3.10.17-linux-armv7-gnueabi/bin/../lib/libpython3.10.so.1.0
One thing I’m noticing, is that this is an aarch64 machine, however uv is downloading the armv7 executables. Running python 3.13 will download the armv7 version, yielding the same error:
yucjo@raspberrypi ~/workspace/projects/ main
❮ uv -v run --python 3.13 python --version
DEBUG uv 0.7.2
DEBUG No project found; searching for Python interpreter
DEBUG Searching for Python 3.13 in virtual environments, managed installations, or search path
DEBUG Searching for managed installations at `/home/yucjo/.local/share/uv/python`
DEBUG Skipping incompatible managed installation `cpython-3.12.10-linux-armv7-gnueabi`
DEBUG Skipping incompatible managed installation `cpython-3.11.12-linux-armv7-gnueabi`
DEBUG Skipping incompatible managed installation `cpython-3.10.17-linux-armv7-gnueabi`
DEBUG Found `cpython-3.9.2-linux-armv7-gnu` at `/usr/bin/python3` (first executable in the search path)
DEBUG Skipping interpreter at `/usr/bin/python3` from first executable in the search path: does not satisfy request `3.13`
DEBUG Found `cpython-3.9.2-linux-armv7-gnu` at `/usr/bin/python` (search path)
DEBUG Skipping interpreter at `/usr/bin/python` from search path: does not satisfy request `3.13`
DEBUG Requested Python not found, checking for available download...
DEBUG Acquired lock for `/home/yucjo/.local/share/uv/python`
DEBUG Using request timeout of 30s
INFO Fetching requested Python...
DEBUG Downloading https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.13.3%2B20250409-armv7-unknown-linux-gnueabi-install_only_stripped.tar.gz
DEBUG Extracting cpython-3.13.3-20250409-armv7-unknown-linux-gnueabi-install_only_stripped.tar.gz to temporary location: /home/yucjo/.local/share/uv/python/.temp/.tmpZnA1Xt
Downloading cpython-3.13.3-linux-armv7-gnueabi (download) (17.0MiB)
Downloading cpython-3.13.3-linux-armv7-gnueabi (download)
DEBUG Moving /home/yucjo/.local/share/uv/python/.temp/.tmpZnA1Xt/python to /home/yucjo/.local/share/uv/python/cpython-3.13.3-linux-armv7-gnueabi
DEBUG Released lock at `/home/yucjo/.local/share/uv/python/.lock`
error: Querying Python at `/home/yucjo/.local/share/uv/python/cpython-3.13.3-linux-armv7-gnueabi/bin/python3.13` failed with exit status exit status: 127
[stderr]
/home/yucjo/.local/share/uv/python/cpython-3.13.3-linux-armv7-gnueabi/bin/python3.13: error while loading shared libraries: /home/yucjo/.local/share/uv/python/cpython-3.13.3-linux-armv7-gnueabi/bin/../lib/libpython3.13.so.1.0: cannot open shared object file: No such file or directory
Platform
Raspbian GNU/Linux 11 (bullseye) aarch64
Version
uv 0.7.2
Python version
3.12.10
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 19 (6 by maintainers)
More investigation:
/proc/sys/kernel/archisaarch64/proc/cpuinfohasFeatures: fp asimd evtstrm crc32 cpuidstd::env::const::ARCHwill be"arm", as it’s set at compile time and roughly follows the target tuple.So something like
if features.contains("vfp") || features.contains("fp")in https://github.com/astral-sh/uv/blob/90a7208a73a2050fe06ff37db11bbc60a7919ef9/crates/uv-python/src/cpuinfo.rs#L19 should work.I can test this later today when that machine is free
Can you share
uv python install 3.12 -vanduv python list 3.12 -v?We have the same problem with a Pi4 on Raspberry Pi OS (Legacy - bullseye). If you need more details let me know:
Installing 3.13.3 works, but then trying to create a venv with it, fails.
I think he meant
--all.