Skip to main content

CompileRedHat — wiki

Although pygame should installed from your package manager in most cases, there are few that require compiling from source. To compile from source in Red Hat/Fedora/CentOS you should follow the commands below.

# As root install the following packages
yum install python-devel SDL_image-devel SDL_mixer-devel SDL_ttf-devel SDL-devel smpeg-devel numpy subversion portmidi-devel 
# It will also install the libraries (of devel packages) as dependancies.

smpeg-devel is at rpmfusion-free repository for fedora/red hat/CentOS. You can read here: how to add that repository.

When all the packages are installed you're ready to download source and compile pygame. You can do that through svn (for the most latest version) with the command below:

# As user do the following
git clone
cd pygame
# Once you're in pygames source folder simply run the following command:
python build
# pygame just compiled from source
# To install it on your system, do the following as root:
python install