[Python-modules-team] Bug#956148: python3-virtualenv: Broken venv/bin/pip when using Python 2.7
Sajith Sasidharan
sajith at hcoop.net
Tue Apr 7 20:24:54 BST 2020
Package: python3-virtualenv
Version: 20.0.16-1
Severity: normal
I need to use Python 2.7, but it seems that I can't use Debian's
virtualenv 20.0.16, because venv/bin/pip fails in the following
manner:
$ mkdir /tmp/py
$ cd /tmp/py
$ virtualenv --python=python2.7 venv
$ ./venv/bin/pip
Traceback (most recent call last):
File "./venv/bin/pip", line 5, in <module>
from pip._internal.cli.main import main
File "/tmp/py/venv/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "/tmp/py/venv/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 "/tmp/py/venv/lib/python2.7/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "/tmp/py/venv/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 "/tmp/py/venv/lib/python2.7/site-packages/pip/_internal/locations.py", line 20, in <module>
from pip._internal.utils.compat import WINDOWS
File "/tmp/py/venv/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
This doesn't seem to happen with Python 3.
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (800, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 5.4.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages python3-virtualenv depends on:
ii python-pip-whl 20.0.2-4
ii python3 3.8.2-2
ii python3-appdirs 1.4.3-2.1
ii python3-distlib 0.3.0-1
ii python3-distutils 3.8.2-2
ii python3-filelock 3.0.12-2
ii python3-importlib-metadata 1.5.0-1
ii python3-pkg-resources 44.0.0-1
ii python3-six 1.14.0-2
python3-virtualenv recommends no packages.
python3-virtualenv suggests no packages.
-- no debconf information
--
"the lyf so short, the craft so long to lerne."
-- Chaucer.
More information about the Python-modules-team
mailing list