Public bug reported:
Please see further discussion at
https://github.com/pypa/pip/issues/7909, where we concluded that
virtualenv on Ubuntu 20.04 is somehow installing pip wrong.
Repro:
$ virtualenv venv
created virtual environment CPython3.8.2.final.0-64 in 158ms
creator CPython3Posix(dest=/tmp/venv, clear=False, global=False)
seeder FromAppData(download=False, html5lib=latest, pyparsing=latest,
distlib=latest, wheel=latest, chardet=latest, colorama=latest,
webencodings=latest, contextlib2=latest, requests=latest, six=latest,
msgpack=latest, pip=latest, urllib3=latest, lockfile=latest, retrying=latest,
pkg_resources=latest, appdirs=latest, progress=latest, idna=latest,
setuptools=latest, pep517=latest, CacheControl=latest, pytoml=latest,
distro=latest, certifi=latest, packaging=latest, via=copy,
app_data_dir=/home/jik/.local/share/virtualenv/seed-app-data/v1.0.1)
activators
BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
$ . ./venv/bin/activate
(venv) $ pip list --outdated
ERROR: Exception:
Traceback (most recent call last):
File
"/tmp/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line
186, in _main
status = self.run(options, args)
File "/tmp/venv/lib/python3.8/site-packages/pip/_internal/commands/list.py",
line 158, in run
packages = self.get_outdated(packages, options)
File "/tmp/venv/lib/python3.8/site-packages/pip/_internal/commands/list.py",
line 165, in get_outdated
return [
File "/tmp/venv/lib/python3.8/site-packages/pip/_internal/commands/list.py",
line 167, in <listcomp>
if dist.latest_version > dist.parsed_version
TypeError: '>' not supported between instances of 'Version' and 'Version'
(venv) $
Fixing it by reinstalling pip:
(venv) $ pip uninstall pip
Found existing installation: pip 20.0.2
Uninstalling pip-20.0.2:
Would remove:
/tmp/venv/bin/pip
/tmp/venv/bin/pip-3.8
/tmp/venv/bin/pip3
/tmp/venv/bin/pip3.8
/tmp/venv/lib/python3.8/site-packages/pip-20.0.2.dist-info/*
/tmp/venv/lib/python3.8/site-packages/pip-20.0.2.virtualenv
/tmp/venv/lib/python3.8/site-packages/pip/*
Proceed (y/n)? y
Successfully uninstalled pip-20.0.2
(venv) $ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1764k 100 1764k 0 0 10.0M 0 --:--:-- --:--:-- --:--:-- 10.0M
(venv) $ python get-pip.py
Collecting pip
Using cached pip-20.0.2-py2.py3-none-any.whl (1.4 MB)
Installing collected packages: pip
Successfully installed pip-20.0.2
(venv) $ pip list --outdated
Package Version Latest Type
----------- ------- ----------- -----
contextlib2 0.6.0 0.6.0.post1 wheel
idna 2.8 2.9 wheel
msgpack 0.6.2 1.0.0 wheel
packaging 20.1 20.3 wheel
pep517 0.7.0 0.8.1 wheel
requests 2.22.0 2.23.0 wheel
setuptools 45.2.0 46.1.3 wheel
(venv) $
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: virtualenv 20.0.13-1
ProcVersionSignature: Ubuntu 5.4.0-18.22-generic 5.4.24
Uname: Linux 5.4.0-18-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu21
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Mar 27 16:46:29 2020
InstallationDate: Installed on 2019-01-02 (450 days ago)
InstallationMedia: Ubuntu 18.10 "Cosmic Cuttlefish" - Release amd64 (20181017.3)
PackageArchitecture: all
SourcePackage: python-virtualenv
UpgradeStatus: Upgraded to focal on 2020-02-25 (31 days ago)
** Affects: python-virtualenv (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 apport-bug focal
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1869431
Title:
TypeError: '>' not supported between instances of 'Version' and
'Version'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-virtualenv/+bug/1869431/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs