--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: pip install changes should be documented
- From: Antoine Beaupre <anarcat@debian.org>
- Date: Mon, 27 Mar 2023 09:55:54 -0400
- Message-id: <167992535476.118064.17774026964385565528.reportbug@angela.anarc.at>
Package: release-notes
Severity: important
Starting in bookworm, the seemingly innocuous command:
pip3 install foo
... will not work anymore. It will fail with this rather distressing
error:
$ pip install rsendmail
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.11/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.
... and while the error is somewhat self-documented, it would probably
help our users to flag this issue *before* they run the upgrade, and I
believe the release notes are a good place for this.
I am not sure *what* to say exactly. I think I'd give a heads up that
this is happening and show an example of `--break-system-packages` or
preferably how to do this in a virtual env.
It's basically a redux of the above error message, but that can't
assume (say) `/usr/share/doc/python3.11` is available because we
haven't done the upgrade yet.
--- End Message ---
--- Begin Message ---
On 2023-04-01 22:29:57, James Addison wrote:
> Package: release-notes
> Followup-For: Bug #1033564
> X-Debbugs-Cc: anarcat@debian.org
>
> Hi Antoine - this seems related to - perhaps an extension of? - some discussion
> on Salsa: https://salsa.debian.org/ddp-team/release-notes/-/merge_requests/142
>
> (I'll admit that I don't tend to use 'pipx' either. I don't know much about it
> though)
Oh yeah, absolutely. Silly me, I even reviewed that MR...
Odd that I didn't find it when I looked in the source... oh well, thanks!
--
We must shift America from a needs- to a desires-culture. People must
be trained to desire, to want new things, even before the old have
been entirely consumed. Man's desires must overshadow his needs.
- Paul Mazur, Lehman Brothers
--- End Message ---