Public bug reported: I've been contracted to upgrade some legacy systems to Python 3. I know Python 2 is EOL, but I do need to be able to run the old system under a virtualenv while I'm working on it.
These are the steps I expect to work, and their erroneous output: $ sudo apt install python-virtualenv $ virtualenv -p python2 test2 $ cd test2 $ . bin/activate $ pip /home/leon/Temp/test2/lib/python2.7/site-packages/pkg_resources/py2_warn.py:22: UserWarning: Setuptools will stop working on Python 2 ************************************************************ You are running Setuptools on Python 2, which is no longer supported and >>> SETUPTOOLS WILL STOP WORKING <<< in a subsequent release (no sooner than 2020-04-20). Please ensure you are installing Setuptools using pip 9.x or later or pin to `setuptools<45` in your environment. If you have done those things and are still encountering this message, please comment in https://github.com/pypa/setuptools/issues/1458 about the steps that led to this unsupported combination. ************************************************************ sys.version_info < (3,) and warnings.warn(pre + "*" * 60 + msg + "*" * 60) Traceback (most recent call last): File "/home/leon/Temp/test2/bin/pip", line 5, in <module> from pip._internal.cli.main import main File "/home/leon/Temp/test2/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 10, in <module> from pip._internal.cli.autocompletion import autocomplete File "/home/leon/Temp/test2/lib/python2.7/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module> from pip._internal.cli.main_parser import create_main_parser File "/home/leon/Temp/test2/lib/python2.7/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module> from pip._internal.cli import cmdoptions File "/home/leon/Temp/test2/lib/python2.7/site-packages/pip/_internal/cli/cmdoptions.py", line 25, in <module> from pip._internal.locations import USER_CACHE_DIR, get_src_prefix File "/home/leon/Temp/test2/lib/python2.7/site-packages/pip/_internal/locations.py", line 20, in <module> from pip._internal.utils.compat import WINDOWS File "/home/leon/Temp/test2/lib/python2.7/site-packages/pip/_internal/utils/compat.py", line 29, in <module> import ipaddr as ipaddress # type: ignore ImportError: No module named ipaddr ProblemType: Bug DistroRelease: Ubuntu 20.04 Package: python-virtualenv 15.1.0+ds-2ubuntu1 ProcVersionSignature: Ubuntu 5.4.0-24.28-generic 5.4.30 Uname: Linux 5.4.0-24-generic x86_64 ApportVersion: 2.20.11-0ubuntu27 Architecture: amd64 CasperMD5CheckResult: skip CurrentDesktop: ubuntu:GNOME Date: Fri Apr 17 11:06:19 2020 InstallationDate: Installed on 2020-01-11 (96 days ago) InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017) PackageArchitecture: all SourcePackage: python-virtualenv UpgradeStatus: Upgraded to focal on 2020-04-11 (5 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/1873369 Title: Python2 virtualenv installs broken pip command To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-virtualenv/+bug/1873369/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs