Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in --outdated and --uptodate parameters from pip list #6012

Closed
Duerno opened this issue Nov 13, 2018 · 3 comments
Closed

Error in --outdated and --uptodate parameters from pip list #6012

Duerno opened this issue Nov 13, 2018 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR

Comments

@Duerno
Copy link

Duerno commented Nov 13, 2018

Environment

  • pip version: 9.0.1-2.3
  • Python version: 3.6.7-1
  • OS: Debian GNU/Linux buster/sid
  • apt package: python3-pip

Description

I receive an error every time I run pip3 list --outdated, and I receive no output after running pip3 list --uptodate.

Expected behavior

A list of outdated python packages, example for pip3 list --outdated:

package001 (1.14.5) - Latest: 1.15.4 [wheel]
package002 (9.0.1) - Latest: 18.1 [wheel]

And example for pip3 list --uptodate:

package003 (40.6.2)
package004 (16.1.0)

How to Reproduce

outdated:

  1. Get pip3 package from 'apt install python3-pip' with sudo
  2. Then run pip3 list --outdated
  3. A TypeError exception raises.

uptodate:

  1. Get pip3 package from 'apt install python3-pip' with sudo
  2. Then run pip3 list --uptodate
  3. Nothing appers and the command ends.

Output

After running pip3 list --outdated, the following exception raises:

Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 157, in run
    packages = self.get_outdated(packages, options)
  File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 174, in get_outdated
    if dist.latest_version > dist.parsed_version:
TypeError: '>' not supported between instances of 'Version' and 'Version'

By adding some prints at the source code, I found that the two objects being compared are instances of <class 'pip._vendor.packaging.version.Version'> and <class 'pkg_resources.extern.packaging.version.Version'> respectively.

And after running pip3 list --uptodate, nothing appears. The objects being compared follow the same pattern as described above.

@starkblitz
Copy link

starkblitz commented Dec 5, 2018

I am getting the same error on Ubuntu 18.04 on my WSL(Windows Subsystem for Linux).

@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label Dec 14, 2018
@yan12125
Copy link
Contributor

yan12125 commented Jan 4, 2019

Most likely this is the same issue as #5429.

@chrahunt
Copy link
Member

I agree, this looks like the same issue. Thanks @yan12125.

If this seems incorrect, please let us know.

@chrahunt chrahunt added the resolution: duplicate Duplicate of an existing issue/PR label Jul 25, 2019
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Jul 25, 2019
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Aug 24, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

5 participants