-
Notifications
You must be signed in to change notification settings - Fork 900
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
pip install of uv can fail for Python < 3.10 with certain Debian Python distributions #10018
Comments
Thank you! |
Which container should I use to reproduce this? |
Nevermind, I reproduced with |
This honestly might not be fixable hah. |
I guess we could sniff for debian and check |
I'm curious if you have |
Thanks for the quick reply! I do have |
Per this code, it appears this might affect Red Hat as well? And along the lines you suggest, it looks like pip uses The more I look at this, there more I'm starting to think this is a whole can of worms to accommodate an upstream problem, and for Python versions that are almost all EOL. At the end of the day...users probably should be using |
I love the project and am grateful for all the work!
I noticed an issue that arose due to a confluence of bad user behaviors. For Python < 3.10 (bad) when using the Debian-based distribution of Python (bad) and not using a venv or pipx (bad), the pip installation of uv can install
uv
to a scripts location thatfind_uv_bin()
then fails to find.I believe what's happening here is actually a known irritation with the Debian distribution of Python: it is patched s.t. scripts are installed to
/usr/local
(https://wiki.debian.org/Python#Deviations_from_upstream), but there is not the appropriate corresponding adjustment insysconfig
, which still points to/usr/bin
for the scripts location. So, in this case, we have:vs.
find_uv_bin()
starts by checkingos.path.join(sysconfig.get_path("scripts"), uv_exe)
There is a cri de cœur on this topic (along with some unsatisfying solutions) here: https://ffy00.github.io/blog/02-python-debian-and-the-install-locations/
Not sure if this is something you want to address or not, but considering the size of the project I thought someone else might run into it. I switched to the standalone installer in this Docker image and that works well.
Details:
This is a Docker container
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal
6.10.11-linuxkit
Python 3.9.5
Python installed via
apt-get install python3.9
The text was updated successfully, but these errors were encountered: