Pip module removed from python3.10?

I used to be able to use pip to install python modules in my home directory, but this is not working anymore:

$ python -V
Python 3.10.2
$ python -m pip install FOO
/usr/bin/python: No module named pip

pip module should be installed by default. If it’s missing, I guess it’s because Fedora packagers decided to remove it, right? I’m curious to know the motivations.
I’m using Fedora 35 Silverblue.

Eventually I’ve installed python3-pip in a toolbox container and installed the module there.

As far as I can remember pip was never packaged with python because some pip installs require the dev libs too (python-dev) which adds more files etc. This goes even back to Python 2.

2 Likes

I don’t have Silverblue-specific experiences, but in the Workstation, it is intended to install pip independently with dnf install pip and then you can use it independently with, e.g., pip install cryptography. Then, modules will be available in the Python interpreter. But it won’t be installed by default, and as far as I remember, this has never been different. Btw, many Python modules are independently available in the Fedora repo, not depending on pip (e.g., cryptography as python3-cryptography)

Now I remember… I downloaded get-pip.py to install it locally, as described here:
https://packaging.python.org/en/latest/tutorials/installing-packages/#ensure-you-can-run-pip-from-the-command-line

I would not recommend doing it that way IF you installed python from your distro packaging.

1 Like

The main motivation to limit packages in an installation media is the size of the installation media. Your use case may require pip, and so you may want pip to be installed by default, but given that it’s easily installable from the repositories, it does not need to be included in the default installation media. By default, the Python interpreter is included in the installation image because a number of tools require it (dnf for example).

1 Like