Not quite. The pip command (at least the fedora version) now will automatically install packages inside the user space, specifically under ~/.local/lib/pythonX.XX/site-packatges/ and the executables under ~/.local/bin unless it is being run as the root user. This does not require using a venv to function, but does only operate as the user similar to a venv.
This has been how pip works on all platforms for quite a while and it's separate from the externally-managed flag. Pip (and python) consider a bare user install to be in the same package "namespace" as the rest of the system if not in a venv.
I install system packages as the root user, but packages such as chirp (and others) using pip as my regular user to avoid overwriting system packages when version dependencies may differ.
Me too, and I have done so for years :)
Yes, this is a change from earlier designs but avoids the necessity of a venv while still having what seems the same advantages. I have not needed a venv to install anything for quite some time, even on my RPi which runs ubuntu and uses octoprint which originally did require the venv.
I believe that for other distros pipx may perform similarly.
User installs are still not allowed with the externally-managed flag. Here's an example from an attempted user install on Ubuntu 24.04:
ubuntu@39107696c71a:/$ pip install --user requests error: externally-managed-environment
× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.
If you wish to install a non-Debian-packaged Python package, create a virtual environment using python3 -m venv path/to/venv. Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make sure you have python3-full installed. If you wish to install a non-Debian packaged Python application, it may be easiest to use pipx install xyz, which will manage a virtual environment for you. Make sure you have pipx installed. See /usr/share/doc/python3.12/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification.
I don't have a Fedora system handy to confirm, but unless they decide not to roll out that flag, Fedora will break in this way when they do.
Debian and Ubuntu are already there. Looks like Arch has as well:
https://bbs.archlinux.org/viewtopic.php?id=286788
(that shows a user install failing).
Even homebrew on macOS has marked their python environment as externally-managed, even though it's a whole python toolchain installed for a single user :)
The comments from this post also show people discussing it breaking --user installs:
https://www.jeffgeerling.com/blog/2023/how-solve-error-externally-managed-en...
--Dan