Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed Ubuntu 13.04 and want to install pygame. I've attempted doing as instructed on the pygame page (using the source code) however I am unable to install the dependencies and I get Unable to locate package for every single one. I then tried, as suggested throughout other forums,

sudo apt-get install python-pygame

however these were quite old forum posts, talking about Ubuntu 9.x. This did not work, and I got the error: unable to locate package pygame. Can someone please help me with this?

Thanks in advance.

share|improve this question
Have you considered using virtualenv to control your dependencies? Greatly helped me when I had trouble with python packages. – cbll Nov 9 '15 at 14:45

Execute these commands as root, using sudo in a terminal.

tar -Jxf Python-3.3.0.tar.xz
cd Python-3.3.0
apt-get build-dep python3
make install 

After that just run the interpreter:

share|improve this answer

Typing sudo apt-get install python-pygame installs PyGame for Python2. I am unsure on how to install PyGame on Python 3 and I do not believe it is officially supported.

share|improve this answer
Downvote: There is not relationship at all between the your current dir and apt-get. This is not the reason why apt-get worked. – Javier Rivera May 31 '13 at 14:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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