0

I'm trying to install pygame on my mac. I'm running OSX El Capitan 10.11.5. When i try installing pygame via pip3:

pip3 install pygame

It comes out with this error

-bash: /usr/local/bin/pip3: /usr/local/opt/python3/bin/python3.5: bad interpreter: No such file or directory

I have checked that pip3 is actually installed by typing

which pip3 -version
/usr/local/bin/pip3

I am at a total loss and it's confusing me quite a bit.. Am i doing it wrong?

  • This may help you although related to python 2.7 - http://stackoverflow.com/questions/31768128/pip-installation-usr-local-opt-python-bin-python2-7-bad-interpreter-no-such-f – DAXaholic Jul 08 '16 at 12:41

1 Answers1

0

Upgrade pip and try

pip install -U pip

After install a virtualenv

pip install --ignore-installed virtualenvwrapper

Edit .bash_profile, in terminal write

echo "source /usr/local/bin/virtualenvwrapper.sh" >> .bash_profile

Refresh bash_profile, in Terminal write source .bash_profile

Make a virtualenv and using python3

mkvirtualenv MyProject --python=python3

And go to your virtualenv

workon MyProject

Now install pygame from pip pip install pygame or pip3 install pygame