We will install Pygame in this tutorial. Pygame should be compatible with all Python versions. At the time of writing there were some incompatibility issues with Python 3, but in all probability, these will be fixed soon. Perform the following steps to install Pygame:
Depending on the operating system, you have the following options with which you install Pygame:
Windows: From the Pygame website (http://www.pygame.org/download.shtml) we can download the appropriate binary installer for the Python version we are using.
Pygame uses the distutils system for compiling and installing. To start installing Pygame with the default options, simply run the following command:
python setup.py
If you need more information about the available options, type:
python setup.py help
In order to compile the code, you need to have a compiler for your operating system. Setting this up is beyond the scope of this book. More information about compiling Pygame on Windows can be found at http://pygame.org/wiki/CompileWindows. More information about compiling Pygame on Mac OS X can be found at http://pygame.org/wiki/MacCompile.