Discussion:
Bug#912379: /usr/bin/pip3: TypeError on "list --outdated": uses different Version implementations
Add Reply
Ben Wiederhake
2018-10-30 21:00:02 UTC
Reply
Permalink
Package: python3-pip
Version: 9.0.1-2.3
Severity: normal
File: /usr/bin/pip3

Dear Maintainer,

I'm having trouble running this command:

pip3 list --outdated

Expected behavior: A list of outdated, local packages
Actual behavior: TypeError

Full error message:

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 168, in
get_outdated
dist for dist in self.iter_packages_latest_infos(packages, options)
File "/usr/lib/python3/dist-packages/pip/commands/list.py", line 169, in
<listcomp>
if dist.latest_version > dist.parsed_version
TypeError: '>' not supported between instances of 'Version' and 'Version'

This is not Debian #878082.

Arch had a similar problem, there it was a packaging error:

https://github.com/pypa/pip/issues/5429

Could it be that the Debian package has a similar issue?

Cheers,
Ben



-- System Information:
Debian Release: buster/sid
APT prefers testing-debug
APT policy: (500, 'testing-debug'), (500, 'stable-updates'), (500, 'stable-debug'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-pip depends on:
ii ca-certificates 20170717
ii python-pip-whl 9.0.1-2.3
ii python3 3.6.6-1
ii python3-distutils 3.6.6-1

Versions of packages python3-pip recommends:
ii build-essential 12.5
ii python3-dev 3.6.6-1
ii python3-setuptools 40.2.0-1
ii python3-wheel 0.30.0-0.2

python3-pip suggests no packages.

-- no debconf information
BenWiederhake.GitHub
2019-01-09 21:50:03 UTC
Reply
Permalink
Control: found -1 18.1-4
Thanks

Hello,

still happens.

This is strictly necessary for the recommended "upgrade-all" method [1].
Pip currently has no other way to do this [2], and this feature is
blocked by other issues [3], so "list --outdated" will continue to be of
interest for a long time.

Cheers,
Ben

[1] https://stackoverflow.com/q/2720014/3070326
[2] https://github.com/pypa/pip/issues/4551
[3] https://github.com/pypa/pip/issues/988
Arnaldo Pirrone
2019-08-12 11:10:02 UTC
Reply
Permalink
Package: python3-pip
Version: 18.1-5
Followup-For: Bug #912379

Hi, the same is happening here:

Exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line
143, in main
status = self.run(options, args)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line
138, in run
packages = self.get_outdated(packages, options)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line
149, in get_outdated
dist for dist in self.iter_packages_latest_infos(packages, options)
File "/usr/lib/python3/dist-packages/pip/_internal/commands/list.py", line
150, in <listcomp>
if dist.latest_version > dist.parsed_version
TypeError: '>' not supported between instances of 'Version' and 'Version'

according to https://github.com/pypa/pip/issues/5429
the bug is located downstream.



-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.2.0-8.1-liquorix-amd64 (SMP w/4 CPU cores; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-pip depends on:
ii ca-certificates 20190110
ii python-pip-whl 18.1-5
ii python3 3.7.3-1
ii python3-distutils 3.7.4-3

Versions of packages python3-pip recommends:
ii build-essential 12.6
ii python3-dev 3.7.3-1
ii python3-setuptools 41.0.1-1
ii python3-wheel 0.32.3-2

python3-pip suggests no packages.

-- no debconf information

Loading...