Virtualenv installation not working


#1

I get this error code when trying to install virtualenv:

-bash: /usr/local/bin/pip: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory

Any suggestions on how to fix?


#2

I solved it. I’d delete the post if I could figure out how to.


#3

No worries! Can you let me know how you solved the issue in case anyone else has this error?


#4

Through googling learned that it could mean that python wasn’t linked but didn’t know what that means or how to fix it. Also learned that about command “brew doctor”

  1. $ brew doctor
    Kicked up a number of errors with the last being that python wasn’t linked and there were instructions on how to fix it (it said to do “$ brew link python” which didn’t work outright but I think there were further instructions which led me to the next step)

  2. $ brew link --overwrite python

This fixed it and I was able to then install virtualenv as per your instructions