Skip to content

Virtualenv 20.0.0b1 error creating venv for brew python2 #1512

Description

@matthew-brett

On my Mac with Homebrew Python2 (and 3):

$ ls -al $(which python2)
lrwxr-xr-x  1 brettmz  admin  37 Nov 15 12:04 /usr/local/bin/python2 -> ../Cellar/python@2/2.7.17/bin/python2

I get:

$ virtualenv --python /usr/local/bin/python2 py2env
Traceback (most recent call last):
  File "/Users/brettmz/Library/Python/3.7/bin/virtualenv", line 8, in <module>
    sys.exit(run())
  File "/Users/brettmz/Library/Python/3.7/lib/python/site-packages/virtualenv/__main__.py", line 16, in run
    run_via_cli(args)
  File "/Users/brettmz/Library/Python/3.7/lib/python/site-packages/virtualenv/run/__init__.py", line 21, in run_via_cli
    session = session_via_cli(args)
  File "/Users/brettmz/Library/Python/3.7/lib/python/site-packages/virtualenv/run/__init__.py", line 33, in session_via_cli
    raise RuntimeError("failed to find interpreter for {}".format(discover))
RuntimeError: failed to find interpreter for Builtin discover of python_spec='/usr/local/bin/python2'

This works without error for current stable virtualenv. Is this intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions