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
--- /usr/bin/virtualenv 2009-12-01 05:44:58.000000000 +0000 +++ ./virtualenv 2012-03-09 16:46:10.000000000 +0000 @@ -1,3 +1,3 @@ -#!/usr/bin/env python +#!/usr/bin/python import virtualenv virtualenv.main()