installing pygame for python2.7 on Centos6

Print Friendly, PDF & Email

My CentOS 6 machine is running Python2.7 alongside the default Python 2.6. A user wanted me to install Pygame. Pygame is in the yum repos but only for python 2.6. How to get it for Python 2.7?

I started with this: http://www.pygame.org/wiki/CompileRedHat?parent=Compilation

That had me install a bunch of RPMs (remember to enable repos like EPEL and RPMFusion). Unfortunately, that repo does *not* have the smpeg and smpeg-devel packages. I can find smpeg and smpeg-devel for Centos5 but not for Centos6. For CentOS 6, I can only find libsmpeg and libsmpeg-devel.

I crossed my fingers and installed that.

I then did:

# As user do the following
hg clone https://bitbucket.org/pygame/pygame
cd pygame
python2.7 setup.py
No Arguments Given, Perform Default Install? [Y/n]Y

WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...

Hunting dependencies...
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
AVFORMAT: not found
SWSCALE : not found
FREETYPE: found 2.3.11

Warning, some of the pygame dependencies were not found. Pygame can still
compile and install, but games that depend on those missing dependencies
will not run. Would you like to continue the configuration? [Y/n]:

Note that it *did* find SMPEG!  (The first time I ran setup.py (not shown), it failed to find SMPEG.)

Success!

About CS SysAdmins

The CS Department System Administrators
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *