[Python-modules-team] Bug#663228: python-virtualenv: /usr/bin/virtualenv has the wrong shebang line

Vinay Sajip vinay_sajip at yahoo.co.uk
Fri Mar 9 16:55:54 UTC 2012


Package: python-virtualenv
Version: 1.4.9-3
Severity: normal
Tags: patch

The /usr/bin/virtualenv script has the shebang line:

#!/usr/bin/env python

whereas it should be

#!/usr/bin/python

The former value causes a failure when run from a virtual environment which
does not itself have the virtualenv package installed, and which is isolated
from the system's dist-packages. That's because the script is run by the
virtualenv's Python and does "import virtualenv", and in an isolated
virtualenv, that module isn't available.

With the correct shebang line, the system Python is run rather than the
virtualenv's python, correctly picking up the module from the system Python's
dist-packages, and all is well.



-- System Information:
Debian Release: 6.0.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-virtualenv depends on:
ii  python                  2.6.6-3+squeeze6 interactive high-level object-orie
ii  python-pkg-resources    0.6.14-4         Package Discovery and Resource Acc
ii  python-setuptools       0.6.14-4         Python Distutils Enhancements (set
ii  python-support          1.0.10           automated rebuilding support for P

Versions of packages python-virtualenv recommends:
ii  python-pip                    0.7.2-1    alternative Python package install

python-virtualenv suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtualenv.diff
Type: text/x-java
Size: 209 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20120309/8e9b451b/attachment.java>


More information about the Python-modules-team mailing list