question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip3 list -o fails with TypeError: unorderable types: Version() > SetuptoolsVersion()

See original GitHub issue

In case vendor packages of pip are unbundled but the vendored “packaging” in setuptool (pkg_resources) not, pip3 list -o fails with

Exception:
Traceback (most recent call last):
  File "/usr/lib64/python3.4/site-packages/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/usr/lib64/python3.4/site-packages/pip/commands/list.py", line 95, in run
    self.run_outdated(options)
  File "/usr/lib64/python3.4/site-packages/pip/commands/list.py", line 107, in run_outdated
    if version > dist.parsed_version:
TypeError: unorderable types: Version() > SetuptoolsVersion()

I cannot find the origin of the problem. packaging is 15.3 as it is in setuptools-18.2 and pip-7.1.2.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:32 (6 by maintainers)

github_iconTop GitHub Comments

18reactions
pradyunsgcommented, Jul 5, 2017

As @Kami-no said, this is caused by the fact that the way some distros package pip is not supported and fragile. The way to fix this to install pip from PyPI. You can even do this to fix it:

pip install --ignore-installed pip

I recommend passing --user additionally.

11reactions
moon-chilledcommented, Oct 18, 2016

Workaround for anyone experiencing this:

# pip3 install --force pip

To forcibly install the “real” version of pip from PiPy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error in installing setuptools (unorderable types - Stack Overflow
I was able to solve my problem (on Win 8.1 64bit, Python 3.4.2) with the change suggested here:.
Read more >
Bug #1579181 ""pip3 list --outdated” raises TypeError”
TypeError : unorderable types: Version() > SetuptoolsVersion(). Expected: a list of outdated packages is displayed.
Read more >
Python3 only error I can't find much documentation on.
Error is "Line 19: TypeError: unorderable types: ListNode() < ListNode()" on the default test case. That's the first pq.put((l.val, l)) entry.
Read more >
distutils.LooseVersion fails to compare number and a word
I wanted to compare versions of packages available in PyPI and it ... TypeError: unorderable types: int() < str() >>> v1.version [1, 5, ......
Read more >
Devuan bug report logs - #248 Pip3 can't list outdated packages.
Package: python3-pip; Reported by: =?UTF-8? ... dist.parsed_version TypeError: unorderable types: Version() > SetuptoolsVersion() > On ASCII x64 KDE.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found