How can I install pygame (http://pygame.seul.org/ - old site is down) on Webfaction?

I'm not familiar with Linux, so I don't know how to compile/config/build/whatever. All I know is it's working on my local Kubuntu installation with "sudo apt-get install python-pygame" but that, of course, fails on Webfaction :)

I'm on web123, if it matters.


asked 04 Nov '10, 02:40

Alexei's gravatar image

accept rate: 0%

I was able to get Pygame + SDL installed by doing the following:

# make a temporary directory where we can download and build stuff
mkdir tmp
cd tmp

# download and install SDL
wget http://www.libsdl.org/release/SDL-1.2.14.tar.gz
tar -xzvf SDL-1.2.14.tar.gz
cd SDL-1.2.14
./configure --prefix=$HOME
make install

# download and extract PyGame
wget http://pygame.seul.org/ftp/pygame-1.9.1release.tar.gz
tar xzvf pygame-1.9.1release.tar.gz
cd pygame-1.9.1release

# Here you need to edit the Setup file and comment out the line that looks like
# _camera src/_camera.c src/camera_v4l2.c src/camera_v4l.c $(SDL) $(DEBUG)
# for some reason the compilation of the camera module fails for me, so I commented it out
vi Setup

# once the camera module is out of the way we can proceed with the installation
# Make sure to use the correct Python version here (e.g. 'python2.5' or 'python2.6')
python2.5 setup.py install --prefix=$HOME

# That's it

answered 04 Nov '10, 09:14

tie's gravatar image

accept rate: 44%

edited 04 Nov '10, 10:10

Hi Alexei,

Basically you just need to download the application:

wget http://pygame.seul.org/ftp/pygame-1.9.1release.tar.gz
tar xvf pygame-1.9.1release.tar.gz
cd pygame-1.9.1release
python setup.py install

Note: You will need to change the python command to the python version you want to use.


answered 04 Nov '10, 02:51

klynton's gravatar image

accept rate: 42%


python2.6 setup.py install

Results in:

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

Hunting dependencies...
sh: sdl-config: command not found
WARNING: "sdl-config" failed!
sh: smpeg-config: command not found
WARNING: "smpeg-config" failed!
Unable to run "sdl-config". Please make sure a development version of SDL is installed.

I found on a (Ubuntu) forum that I also need to install sdl-config and sdl-dev :(

(04 Nov '10, 04:27) Alexei Alexei's gravatar image

I suggest you can install SDL using


Hope that helps!


answered 04 Nov '10, 05:02

neeravk's gravatar image

accept rate: 41%

As I said earlier, I don't know how to compile/build/make stuff. That's why my local server is Kubuntu, because it makes it easier to install stuff and allows me to concentrate on coding. Thanks, anyway.

(04 Nov '10, 07:40) Alexei Alexei's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 04 Nov '10, 02:40

Seen: 6,183 times

Last updated: 04 Nov '10, 10:10

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited