On Wed, May 17, 2023 at 17:47:31 +0200, Martin Rys wrote:
Some time ago, PEP 668[1] enabled distributions to mark the python installation as externally managed by a package manager, thus preventing pip from breaking the system by either installing packages to the system or locally in the home folder.
Debian has already adopted this[2].
From my understanding, setting the flag EXTERNALLY-MANAGED only allows using pip inside of a virtualenv and bans using it anywhere else, unless the user uses the very self-explanatory flag --break-system-packages.
Currently on Arch, users can run either `sudo pip`, which will install packages as system and break pacman altogether, or `pip` which automatically uses the --user flag nowadays, which will still break things if done outside of virtual env.
Quoting arojas[3], "There are hundreds of bug reports around caused by user installed pip packages overriding system ones" it seems like using the new EXTERNALLY-MANAGED mechanism would greatly reduce wasted time for both users and people managing the bug tracker.
Recalling my days of helping new users, I cannot count how many times someone broke their system because they followed a poorly written guide on the Internet telling them to 'sudo pip' or 'sudo cpan'. I would have *loved* to have this feature back in those days. The number of users it will help is incalculable. This will help not just Arch users, but every user on every platform that ships Python. If big distros like Debian and Arch adopt it, others will learn about it and feel pressure to adopt it as well. Please, please, at least consider this. It is some work to do, sure, but with the proper error message like the Debian example in the PEP, it will make so many new users' (and experts') lives significantly better. This is the kind of safeguard we should have had all along. -- Cheers, Luna Celeste