Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
Re: 'python3.10 -m pip install --user <package>' needs '--break-system-packages' argument
To:
Roger Marsh <r.m@rmswch.plus.com>
Cc:
ports@openbsd.org
Date:
Tue, 21 May 2024 14:29:12 +0100

Download raw body.

Thread
On 2024/05/21 10:05, Roger Marsh wrote:
> Surely the --user argument should remove the need for the --break-system-packages argument?

That was a deliberate choice on the part of Python, see https://peps.python.org/pep-0668/

: The python3 executable available to the users of the distro and the
: python3 executable available as a dependency for other software in the
: distro are typically the same binary. This means that if an end user
: installs a Python package using a tool like pip outside the context of a
: virtual environment, that package is visible to Python-language software
: shipped by the distro. If the newly-installed package (or one of its
: dependencies) is a newer, backwards-incompatible version of a package
: that was installed through the distro, it may break software shipped by
: the distro.
...
: This applies both to system-wide installs (sudo pip install) as well
: as user home directory installs (pip install --user), since packages in
: either location show up on the sys.path of /usr/bin/python3.