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

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Jul 6 00:17:58 EDT 2018


On Fri, 06 Jul 2018 11:58:08 +1000, Chris Angelico wrote:

> On Fri, Jul 6, 2018 at 11:35 AM, Steven D'Aprano
> <steve+comp.lang.python at pearwood.info> wrote:
>> On Fri, 06 Jul 2018 03:47:55 +1000, Chris Angelico wrote:
>>
>>> What's the output of:
>>>
>>> $ apt-cache show python3-pip
>>
>> Mysteriously, the output is repeated twice, in every-so-slightly
>> different formats. It's the little details like that give us confidence
>> in the quality of the software...
> 
> The solution to the mystery is here:
> 
>> Package: python3-pip
>> Version: 8.1.1-2ubuntu0.4
>>
>> Package: python3-pip
>> Version: 8.1.1-2
> 
> You can see where the two packages come from with:
> 
> $ apt-cache policy python3-pip
> 
> It probably means you have multiple package sources configured; 

I am using the default configuration.

> or
> perhaps you have one installed currently, and you could upgrade to a
> slightly updated version.

Given that I had just run apt install python3-pip yesterday, that would 
be surprising but not impossible... let's find out:

steve at orac /home $ apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (8.1.1-2ubuntu0.4).


> In any case, setuptools is listed in the recommends.

If setuptools isn't included, pip can fail.

I don't know if it will fail *always*, but it will surely fail *most* of 
the time. setuptools should not be treated as an optional extra for pip.



-- 
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson



More information about the Python-list mailing list