-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
- We run python and uv in containners. Python comes the following site.getsitepackages(): '/usr/local/lib64/python3.12/site-packages', '/usr/local/lib/python3.12/site-packages', '/usr/lib64/python3.12/site-packages', '/usr/lib/python3.12/site-packages'.
- '/usr/local/lib64/python3.12/site-packages' folder doesn't exist by default (This is after we run
dnf install python3.12on ubi8 base image). If calling "uv pip install" with some binary package, it will be created and the binary package will be installed into there. - In this case we want to call "uv pip install some-pure-python-package --bytecode-compile". I can confirm, if calling "uv pip install some-pure-python-package", the pacakge will be installed into '/usr/local/lib/python3.12/site-packages', and '/usr/local/lib64/python3.12/site-packages' won't be created.
- calling "uv pip install some-pure-python-package --bytecode-compile" fails with obscure message:
error: Failed to bytecode-compile Python file in: /usr/local/lib64/python3.12/site-packages
Caused by: Failed to start Python interpreter to run compile script
It took me more then half a day, to finally figure out the error is because '/usr/local/lib64/python3.12/site-packages' doesn't exist, and the packages are being installed into '/usr/local/lib/python3.12/site-packages'. In this case, I think uv should gracefully taking care the situation, either to create an empty '/usr/local/lib/python3.12/site-packages' folder, or not fail anyway.
Platform
Redhat ubi8 base image
Version
0.8.13
Python version
Python 3.12.11
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working