Installing and Running Pygame

First you need to install Python. Then go to www.pygame.org and in the menu on the left, click "Downloads". Installation instructions are below.

To use the pygame module in Python programs, type import pygame at the beginning of your program. You may get warnings about missing modules called numpyarray, numpy or Numeric. Warnings can be ignored, but if you get errors that stop you from running your programs, you'll need to install the package mentioned. Let us know, and we'll add instructions here.

Mac OSX

Download pygame-1.8.1release-py2.5-macosx10.5.zip (8.3MB). Double-click on this file to extract it — it creates a directory in the same location called "pygame-1.8.1release-py2.5-macosx10.5". Inside is a file called "pygame-1.8.1release-py2.5-macosx10.5.mpkg" — double-click it and follow the instructions (default settings should be fine).

You will also need pyobjc. Download pyobjc-1.4-py2.5-macosx10.4.mpkg.zip (5.2MB). Double-click it to extract it, creating a .mpkg file. Double-click it and follow the instructions.

Note: This doesn't work with the version of Python that comes pre-installed with OSX, only with the package from the Python website.

Windows

Download pygame-1.8.1.win32-py2.5.msi. Double-click it, and if it gives you a warning, press "Run". Select the directory where you installed Python (default C:\Python25) and follow the instructions.

Unix/Linux

Download pygame-1.8.1release.tar.gz. Execute the following commands:

  • tar -xzf pygame-1.8.1release.tar.gz
  • cd pygame-1.8.1release
  • python setup.py