-
Notifications
You must be signed in to change notification settings - Fork 57
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
Exclude /usr/lib/python3.*/EXTERNALLY-MANAGED to fix system-wide pip install due to PEP-668 #155
Comments
I don't agree that we should apply this generally in the Debian images. Users of a system installed python should be aware that they are possibly breaking system tools. Users of the
|
I'm leaning towards agreeing that this is probably not something we should set for the general case; the workarounds for users to "opt into" the breakage are relatively unobtrusive while still pretty clearly communicating user intent (adding My concern is primarily around what the PEP describes as "single-application containers", which is the ideal mode for Docker container images, but I don't think it's fair to say that it's how everyone is using the |
Oh, this can be set via environment variable too: |
The Python PEP-668 introduces a big breaking change by forbidding the system-wide installation of Python packages via
pip
.All the many many
Dockerfile
s out there runningpip install
are now broken as soon as they try to move to Bookworm-based image:The goal is to prevent issues when mixing and matching distro-managed packages and pip-installed ones.
However, this is not really an issue for containers. Citing the use-case #5 in PEP-668 itself:
The suggestion is thus for Docker containers to remove the
/usr/lib/python3.11/EXTERNALLY-MANAGED
file.Rather than having everyone
rm
it, could the base container ship a dpkg exclusion to prevent any/usr/lib/python3.*/EXTERNALLY-MANAGED
files from being installed?The text was updated successfully, but these errors were encountered: