Bug#1033564: pip install changes should be documented

2023-04-01 Thread James Addison
Package: release-notes
Followup-For: Bug #1033564
X-Debbugs-Cc: anar...@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)



Bug#1033564: pip install changes should be documented

2023-03-27 Thread Antoine Beaupre
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.