I recently upgrade from python 3.5 to python 3.6 (with brew on macOS). However virtualenvwrapper now seems to be broken and I get the error. A reinstall didn't help unfortunately.
mkvirtualenv:78: /usr/local/bin/virtualenv: bad interpreter: /usr/local/opt/python3/bin/python3.5: no such file or directory
I have VIRTUALENV_PYTHON=python3
set so the default is to install a virtualenv with python3.
mkvirtualenv -p PATH_TO_PYTHON_EXECUTABLE NAME_OF_YOUR_ENV
$ python
. Give me 2.7.10 rather than the update 2.7.13 so I think it's launching the system python rather than the brew versionwhich python
returns/usr/bin/python
and trying to fix withbrew unlink python && brew link python
doesn't work unfortunately.python
andpython2
and python 3 topython3
commands. This simplifies the issue.