I have anaconda on Ubuntu 14.04. I want to install the pygame module with anaconda. I already run sudo apt-get install python-pygame, but this only works on python, not in anaconda.


I realize I am quite late to the party but here is what worked for me if anyone needs it. Ubuntu 14.04 64-bit with Anaconda 2.3.0 installed.

Install binstar:

conda install binstar

You get a response like: The 'binstar' conda package has been renamed to 'anaconda-client'. Please run: conda install anaconda-client. So run:

conda install anaconda-client

Then search for the pygame package on anaconda.org:

anaconda search -t conda pygame

You get a list of pygame packages available at anaconda.org. Select a package for your distribution e.g. tlatorre/pygame is for Linux 64-bit. To install it use:

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

Once done, import pygame should work.

Credit: Answer by cohdez on https://stackoverflow.com/questions/29137369/installing-pygame-module-in-anaconda-mac

| improve this answer | |

Use this code at Terminal: conda install binstar conda clean --lock conda install anaconda-client

Search for appropriate package at:

anaconda search -t conda pygame

For Python 3 use the following

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

for Ubuntu this would work

| improve this answer | |

I'm having the same problem and am looking for the same answer. Sadly, I didn't find an answer to install pygame with anaconda. What I did find is an alternate solution. You have to change your path like so:

Open terminal and run

echo $PATH

then you will see:


Now, copy this from the : to the end (excluding :). Then, run


This will make the terminal use the default python and pygame will work. This is not permanent. When you close the terminal, this is automatically changed.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.