uv icon indicating copy to clipboard operation
uv copied to clipboard

compatibility with filprofiler

Open mayli opened this issue 6 months ago • 3 comments

Summary

$ uvx --from filprofiler fil-profile run
/home/ubuntu/.cache/uv/archive-v0/XOqyFIkcUdoVQgnvzTIvp/bin/python: error while loading shared libraries: /home/ubuntu/.cache/uv/archive-v
0/XOqyFIkcUdoVQgnvzTIvp/bin/../lib/libpython3.13.so.1.0: cannot open shared object file: No such file or directory

Seems uv has a different dir layout that filprofiler expects?

Maybe it's due to https://github.com/astral-sh/python-build-standalone?

Platform

Linux 6.8.12-8-pve x86_64 GNU/Linux

Version

uv 0.7.3

Python version

Python 3.13.1

mayli avatar May 12 '25 07:05 mayli

Does Python work when you run it the usual way? If so, then it's a bug in filprofiler rather than uv.

konstin avatar May 12 '25 09:05 konstin

yep, the python from system works, even with uv wrapper.

mayli avatar May 13 '25 06:05 mayli

CC @geofft

konstin avatar May 13 '25 07:05 konstin

Can you try the latest version of uv and its Python distribution? On an existing system do

uv self update
uv python install --reinstall

The command you provided seems to be working with uv 0.7.6 and up. If you're still seeing it fail with latest uv and its Python distribution, please reopen!

(I spoke with the filprofiler maintainer at PyCon and we believe that this is, ultimately, the result of a glibc bug that we've seen before - filprofiler is using an explicit ld.so invocation to add its profiling library to the process. The glibc bug will be fixed in the next release, but getting your glibc upgraded is going to be a much slower process. :-) In the meantime, we reworked our Python builds for performance and other benefits, in a way that happens to avoids triggering this bug as a happy side effect; see astral-sh/python-build-standalone#592 if you're curious.)

geofft avatar May 22 '25 20:05 geofft

The issue might need reopening: I still have this error even after upgrading to 0.7.8 and reinstalling python as advised.

Used python version is cpython-3.12.10-linux-x86_64-gnu. Also didn't work with the latest 3.13.

m09 avatar May 28 '25 09:05 m09

dev ~> uv self update

info: Checking for updates...
success: Upgraded uv from v0.7.3 to v0.7.8! https://github.com/astral-sh/uv/releases/tag/0.7.8
dev ~> uv python install --reinstall

Installed 2 versions in 2.88s
 ~ cpython-3.12.2-linux-x86_64-gnu
 ~ cpython-3.13.1-linux-x86_64-gnu

dev ~> uvx --from filprofiler fil-profile run
Installed 2 packages in 9ms
/home/ubuntu/.cache/uv/archive-v0/U8O-Ll-Ws93YOh1C1eVP-/bin/python: error while loading shared libraries: /home/ubuntu/.cache/uv/archive-v0/U8O-Ll-Ws93YOh1C1eVP-/bin/../lib/libpython3.13.so.1.0: cannot open shared object file: No such file or directory

Sounds like worth reopening to me, btw uvx+filprofiler work fine on macOS @geofft

mayli avatar May 28 '25 17:05 mayli

Yes, sorry for not updating this issue—we had to revert the change for other reasons. Hopefully we'll be able to re-land it very soon!

geofft avatar May 28 '25 17:05 geofft