Pygame Setup for Windows, Mac, and Linux 287
Pygame for Linux
Similar to installing Pygame on a Mac, you have two options for
Pygame on Linux:
- You can install Pygame for Python 2, the version of Python that
is likely to have come pre-installed as part of your version of
Linux. For Chapters 1 through 7, you’ll need to use Python 3,
so follow the instructions in Appendix A and use that version
of IDLE for the apps in the first seven chapters. Then, for
Chapters 8 through 10, you can use Pygame for Python 2 to
run the Pygame examples in those chapters. If you choose this
option, follow the steps under “Pygame for Python 2” in the next
section.
- To install Pygame for Python 3.4 on Linux, see the instructions
online at http://www.nostarch.com/teachkids/. If you’re doing
this at school or work, you will likely need IT support. Give your
IT professional the online instructions to use as a guide.
Pygame for Python 2
Most Linux operating systems come with Python installed already,
usually Python 2. The game-based and graphical apps in Chapters 8
through 10 can run just fine on this older version of Python. The
following steps will get Pygame up and running on your Linux
system.
- In the Dash menu, go to System Tools and run the Synaptic
Package Manager or similar application for your version of
Linux. Figure B-13 shows the package manager running on
Lubuntu.
Figure B-13: Installing Pygame for Python 2 on Linux