pip list --outdated gives all packages

Cecil Westerhof Cecil at decebal.nl
Sat May 27 07:15:33 EDT 2017


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
            }
        }'

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



More information about the Python-list mailing list