[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RANT why the *%#&%^ does installing pip not install setuptools???

On Fri, Jul 6, 2018 at 3:37 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> I'm trying to install pip on a Linux Mint box. The maintainers of Mint
> (or possibly their upstream distro, Ubuntu) decided in their infinite
> wisdom to remove the ensurepip package, so
>     python3 -m ensurepip
> fails ("No module named ensurepip"). Okay, let's do this the hard way:
>     sudo apt install python3-pip
> Yay, that worked! So then I try using it:
>     python3 -m pip install blahblahblah
> and after downloading the entire package, it crashes:
>     ImportError: No module named 'setuptools'
> because *of course* why would you treat setuptools as a dependency of
> pip, just because it happens to be a dependency of pip? That would be too
> sensible.
>     sudo apt install python3-setuptools
> fixed the issue. But now I want to go out and kick puppies.

What's the output of:

$ apt-cache show python3-pip

? On my system (Debian Stretch), the dependencies are:

Depends: ca-certificates, python3-distutils, python-pip-whl (=
9.0.1-2.3), python3:any (>= 3.4~)
Recommends: build-essential, python3-dev (>= 3.2), python3-setuptools,

It looks like this needs to be promoted out of recommends into
depends, but if (as is commonly the default) your apt is configured to
automatically install recommended packages, you should be fine.

If kicking puppies isn't your thing, you may want to raise this with
the package maintainer. Again, using the info from my system, which
may not be quite the same as yours:

Maintainer: Debian Python Modules Team
<python-modules-team at lists.alioth.debian.org>