[Python-modules-team] Bug#832616: Bug#832616: virtualenv: Doesn't seem to know what version it runs under

Barry Warsaw barry at debian.org
Fri Jul 29 21:28:12 UTC 2016


On Jul 27, 2016, at 05:06 PM, Matijs van Zuijlen wrote:

>virtualenv allows specifying the python version to use. However, when
>doing so I get the following output:
>
>     $ virtualenv -p /usr/bin/python3 --system-site-packages .venv
>     Already using interpreter /usr/bin/python3
>     [..]
>
>It seems to indicate I didn't need to pass in the python interpreter to
>use.

This message is telling you that the -p option is exactly the same path as
sys.executable.  Basically when virtualenv is invoked with a -p that isn't
sys.executable, it will re-exec itself with the requested interpreter.
However, in Debian, /usr/bin/virtualenv is shebanged to /usr/bin/python3 even
though the default -p option is still /usr/bin/python.  This is why you don't
get this console message with the default invocation.  Generally virtualenv's
shebang is unimportant.

I agree the warning is a little confusing, but I don't think it's worth
changing in Debian.  I'm not even sure it's worth reporting upstream.

You can just safely ignore the message.



More information about the Python-modules-team mailing list