pip list --outdated gives all packages

Cecil Westerhof Cecil at decebal.nl
Sat May 27 11:10:03 EDT 2017


On Saturday 27 May 2017 16:34 CEST, Cem Karan wrote:

>
> On May 27, 2017, at 7:15 AM, Cecil Westerhof <Cecil at decebal.nl> wrote:
>
>> On Saturday 27 May 2017 12:33 CEST, Cecil Westerhof wrote:
>>
>>> I wrote a script to run as a cron job to check if I need to update
>>> my Python installations. I migrated from openSUSE to Debian and
>>> that does not work anymore (pip2 and pip3): it displays the same
>>> with and without --outdated. Anyone knows what the problem could
>>> be?
>>
>> It does not exactly displays the same, but it displays all
>> packages, while in the old version it only displayed the outdated
>> versions. I already made a change with awk, but I would prefer the
>> old functionality.
>>
>> By the way, the patch is:
>> pip2 list --outdated --format=legacy | awk '
>> {
>> if (substr($2, 2, length($2) - 2) != $5) {
>> print $0
>> }
>> }'
>
> Could you check the output of 'pip3 --version'? When I tested pip3
> on my machine, 'pip3 list --outdated' only yielded the outdated
> packages, not a list of everything out there.

Both as normal user and root I get:
    pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.5)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof



More information about the Python-list mailing list