Unable to install any package as normal user with `--user` option. >error: externally-managed-environment Reproducible: Always Steps to Reproduce: 1. $ pip install --user jupyter Actual Results: ``` error: externally-managed-environment × This environment is externally managed ╰─> The system-wide Python installation in Gentoo should be maintained using the system package manager (e.g. emerge). If the package in question is not packaged for Gentoo, please consider installing it inside a virtual environment, e.g.: python -m venv /path/to/venv . /path/to/venv/bin/activate pip install mypackage To exit the virtual environment, run: deactivate The virtual environment is not deleted, and can be re-entered by re-sourcing the activate file. note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. hint: See PEP 668 for the detailed specification. ``` Expected Results: package should install normally to ~/.local Downgrading to pip-22.x fixes the issue.
This is somewhat intentional on the pip side but https://github.com/pypa/pip/pull/11780 makes it much more tolerable.
I don't get how it can be intentional. Error message talks about *system-wide* installation. "--user" is NOT *system-wide" installation.
Oh, I didn't notice link to https://github.com/pypa/pip/issues/11776. So, it is decision made by pip developers, not Gentoo.
As mentioned in the upstream bug report, `--user` installation can be re-enabled by adding to ~/.config/pip/pip.conf: [global] break-system-packages = true user = true
I just wanted to re-install a editable (`--user -e `) version of something I wrote myself. All the dependencies are installed via `emerge`. I have to turn on `break-system-packages` for that? Hmmm. Anyway, the upstream bugs were closed with the `--break-system-pacakges` argument added to pip 23.0.1, which is now stable in the tree.