packaging.python.org icon indicating copy to clipboard operation
packaging.python.org copied to clipboard

Document special casing pip entrypoints

Open konstin opened this issue 1 year ago • 2 comments

When installing entrypoints, pip special cases itself: It will always create pip, pip{major} and pip{major}.{minor} entrypoints, even the universal pip wheel has hardcoded pip, pip3 and pip3.10 entrypoints (https://inspector.pypi.io/project/pip/24.0/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl/pip-24.0.dist-info/entry_points.txt). It should be documented that alternative installers also need to special to avoid virtual environments where the pip executable version mismatches the python version (https://github.com/astral-sh/uv/issues/1593).

CC @pradyunsg

konstin avatar Feb 21 '24 09:02 konstin

I'm not entirely sure we should document this.

The presence of the pip3.x entry points in the pip wheels, I personally consider that a bug that should be fixed in pip.

pip could then continue to generate the pip3.x entry point when it installs itself, for the sake of backward compatibility, but it may not be necessary to mandate other installers to do so.

sbidoul avatar Feb 21 '24 10:02 sbidoul

Right, this (incredibly unexpected) behavior from pip caused me some headache as well: https://github.com/pypa/pip/issues/8010

sinoroc avatar Feb 21 '24 18:02 sinoroc