On 4/17/25 15:15, Grant Edwards via Python-list wrote:
On 2025-04-17, Left Right via Python-list <python-list@python.org> wrote:
Also... when installing stuff with pip --user, it is always a package
that is not installed for the system (usually not even available for
the system). How can that "break system packages"?

pip installs dependencies. Dependencies may disagree on the version
with the system packages.

Good point. I don't generally allow pip to install dependencies, so I
forgot about that source of conflict. But as far as I can see, it
still can only break stuff for the user, not for the system. The
system is never going to look in my ~/.local/lib/python* directories.
Sure, and it's "your fault" (sic) if you break yourself. You and I can maybe accept that. But it's usually not obvious that you're done anything to break stuff - you just asked to install something, according to the instructions you read on the project's website, which it's reasonable (?) to expect reflects best practices. Usually a simple "pip install".

Say you've been using "MLwiz" installed via a system package. It has two dozen dependencies, some of which have further deps. And it works great. Then you install "Chatbridge" via pip, and it brings with it its own dependencies. It's not really useful to refuse to let it bring its own deps with it since there may be version-specific requirements on its deps, which that project has reasons for. So now you've got a few pkgs in the system with different versions in your .local, and you can't run MLwiz any longer, because a .local pkg (picked up first) conflicts with the requirements of MLwiz.

There's just not a really great answer to this.

"Use a virtualenv". Fine, but that's still daunting to many, and not necessarily as well described as it could be, and the choice of the word "virtual" in the name makes it sound more complex than it actually is. Projects can certainly do better at describing installation scenarios - at least if they have more than a trivial number of deps, where the conflict chances go up rapidly.


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to