Pre-installation dependent package check and installation
Python-devel sdl_image-devel sdl_mixer-devel sdl_ttf-devel sdl-devel numpy Subversion portmidi-devel libsmpeg-devel
-------------------
#yum install python-devel sdl_image-devel sdl_mixer-devel sdl_ttf-devel sdl-devel numpy Subversion portmidi-devel-y
@ install libsmpeg-devel
Create the repository config file/etc/ Yum.repos.d/linuxtech.repo:
[Linuxtech]
Name=linuxtech
baseurl=http://pkgrepo.linuxtech.net/el6/release/
enabled=1
Gpgcheck=1
gpgkey=http://pkgrepo.linuxtech.net/el6/release/ Rpm-gpg-key-linuxtech.net
Install libsmpeg-devel rpm Package:
# Yum Install libsmpeg-devel
Install pygame
------------------
#wget http://www.pygame.org/ftp/ pygame-1.9.1release.tar.gz
#tar xvf pygame-1.9.1release.tar.gz
#cd pygame-1.9.1release
#python config.py
Sdl:found 1.2.14
Font:found
Image:found
Mixer:found
Smpeg:found 0.4.5
Png:found
Jpeg:found
Scrap:found
Portmidi:found
Porttime:not found (ignore)
Display the above information, and the relevant software package can be found to, you can continue to install Pygame
#python setup.py Build
#python setup.py Install
Reference: Http://pygame.org/wiki/CompileRedHat
Installing Pygame on CentOS