Reputation: 7428
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.
Upvotes: 13
Views: 8611
Reputation: 141
Use: pip install --upgrade virtualenv
OR: sudo pip install -U --force-reinstall virtualenv
Upvotes: 0
Reputation: 4811
For me, it was because there were spaces in some of the directory names and virtualenv
did not parse the path correctly. To be safe, just remove spaces from the directory names and replace them with -
or _
and it should work fine :)
Upvotes: 0
Reputation: 426
which python3.6
to show the path of python3.6 /usr/local/bin/virtualenv
#!
with the path of python3.6 beforeUpvotes: 41