Install pygame module in anaconda mac

I have Anaconda installed on my mac. And he messed up with my pygame module.

I tried to follow this tutorial and replacing pip3 install pygame with conda install pygame . I tried conda install pip and then pip install pygame , but I got the following error:

 Collecting pygame Could not find any downloads that satisfy the requirement pygame Some externally hosted files were ignored as access to them may be unreliable (use --allow-external pygame to allow). No distributions at all found for pygame 

(ideas that I got from this thread )

Using "py install pygame" worked before I did a "cond install install", but my python by default is now anaconda alone and no longer has access to pygame. Using which pip gives /Users/jensdonlin/anaconda/bin/pip

Does anyone have any suggestions that would allow the anaconda version of python3 to access pygame?

Perhaps the answer includes use --allow-external pygame to allow , but I'm not sure how to use it.

+7
python pygame anaconda
source share
3 answers

The problem is that pygame developers did not load pygame into PyPI. Therefore, to install it, you have to download it, and pip install the downloaded source, as described in the tutorial that you linked. You can do this in Anaconda Python. Note that in Anaconda Python, even if it's Python 3, pip is simply called pip , not pip3 .

+3
source share

After two days of turmoil with macports and homebrew without joy, the instructions here worked for me using Anaconda Python 2.7.10 on a Mac. Repeat them here if the linked site ever disappears!

First open a terminal and enter the following two lines:

 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" brew install sdl sdl_ttf sdl_image sdl_mixer portmidi 

If you do not have the binstar type installed:

 conda install binstar 

At this point, he can tell you that the "binstar" conda package has been renamed to "anaconda-client", and you should enter it instead:

 conda install anaconda-client 

Just do what he tells you. Then finally enter:

 conda install -c https://conda.binstar.org/quasiben pygame 

and hope you are done!

+12
source share

I have tried many pip permutations. The problem is that I did not specify the path to the file that I tried pip install pygame . Now I have successfully installed pygame following the above guide and using: pip install /Users/YOURNAME/Downloads/pygame

0
source share

All Articles