Public bug reported:

Ubuntu 16.04.3 LTS

After installing python3-virtualenv @ `15.0.1+ds-3ubuntu1`, running
'python3 -m virtualenv venv' will create a virtualenv using the python2
executable. It should instead create a virtualenv with the interpreter
it was invoked with.

This is a result of line 546 in /usr/lib/python3/dist-
packages/virtualenv.py:

542-    parser.add_option(
543-        '-p', '--python',
544-        dest='python',
545-        metavar='PYTHON_EXE',
546:        default='python2',
547:        help='The Python interpreter to use, e.g., --python=python2.5 will 
use the python2.5 '
548:        'interpreter to create the new environment.  The default is the 
python2 '
549:        'interpreter on your path (e.g. /usr/bin/python2)')

default should not be set here; if the -p flag and VIRTUALENV_PYTHON are
unset, the check "if options.python and not
os.environ.get('VIRTUALENV_INTERPRETER_RUNNING')" will fail and it will
simply use the interpreter it was invoked with, which is the documented
behavior.

** Affects: python-virtualenv (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1749873

Title:
  python3 -m virtualenv defaults to python2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-virtualenv/+bug/1749873/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to