#install dependencies
sudo apt-get install mercurial python-dev python-numpy python-opengl \
libav-tools libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev \
libtiff5-dev libx11-6 libx11-dev fluid-soundfont-gm timgm6mb-soundfont \
xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic fontconfig fonts-freefont-ttf
# Grab source
hg clone https://bitbucket.org/pygame/pygame
# Finally build and install
cd pygame
python setup.py build
sudo python setup.py install
# Run some tests
python -m pygame.tests
python -m pygame.examples/aacircle
python -m pygame.examples/aliens
python -m pygame.examples/freetype_misc
python -m pygame.examples/glcube
python -m pygame.examples/sound
python -m pygame.examples/stars
亲测有用,文章源自http://www.pygame.org/wiki/CompileUbuntu?parent=Compilation