Policy violation with respect to ensurepip
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-pip (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 21.10
Release: 21.10
Package version: libpython3.9-stdlib 3.9.7-2build1
Module 'ensurepip' is missing from the standard Python library.
According to the Debian Python Policy, section 2.5,
"Modules that would interfere with system package management (for example
ensurepip, when used outside virtual environments) are modified to print a
message explaining the problem and recommending alternatives."
However, in practice this module is not provided at all:
$ python3.9
Python 3.9.7 (default, Sep 10 2021, 14:59:43)
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ensurepip
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundE
>>>
Of course, it would have been much better if pip and ensurepip were included in the default Python installation, which is what absolutely everyone expects; and this could also help avoid contradicting the official Python documentation. But if they are not included, I think users at least deserve to know why and how to work around this limitation. Particularly considering that the python3-pip package may not always be a suitable workaround (see bug #1955727).
Thank you.
There's no sensible way to use ensurepip on Debian, outside a virtualenv. So I don't think it's much of a workaround for #1955727.