Discussion:
Bug#1033564: pip install changes should be documented
(too old to reply)
Antoine Beaupre
2023-03-27 14:00:02 UTC
Permalink
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 a
James Addison
2023-04-01 21:40:01 UTC
Permalink
Package: release-notes
Followup-For: Bug #1033564
X-Debbugs-Cc: ***@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)
Debian Bug Tracking System
2023-04-03 17:20:02 UTC
Permalink
Your message dated Mon, 03 Apr 2023 13:15:09 -0400
with message-id <***@angela.anarc.at>
and subject line Re: Bug#1033564: pip install changes should be documented
has caused the Debian Bug report #1033564,
regarding pip install changes should be documented
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
1033564: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1033564
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...