Mar 18, 2015
UPDATE: Apparently, this is no longer necessary. As of February, 2017, you can just run
pip install pygame and it will install the right version of pygame for your environment. (Thanks, Chek Wei).
I’m not a game developer, but I’ve been playing with Pygame lately and have been impressed. I plan to use it in one of our Python courses to teach object-oriented programming. I use 64-bit Windows 8, so I have the 64-bit version of Python 3.4. Most of our students are unlikely to be game developers, but because games have obvious visible objects, they provide a nice framework for teaching OOP.
Unfortunately, Pygame doesn’t have an official 64-bit installer, so they recommend you use the 32-bit version of Python. So, I installed the 32-bit version of Python alongside the 64-bit version I already had, but that was a pain as I had to constantly make sure I was running the right one. It also made the 32-bit version the default.
Luckily, Christoph Gohlke of the University of California, Irvine has made a bunch of 64-bit binaries available for Python extension packages, including one for pygame.
The installation file is a wheel file, which can be pretty tricky to install. The documentation is a bit weak, so I’ve laid it out here.
Note that these instructions assume you already have a 64-bit version of Python installed.
To install the Windows 64-bit version of Pygame, which is the only version that will work with the 64-bit version of Python, follow these steps:
pip installcommand from a different directory. Either use navigate to the correct directory (reference) and run the command again or run the command using a full absolute path (e.g., “pip install c:\users\nat\pygame-1.9.2a0-cp34-none-win_amd64.whl”).
Have fun making games with pygame!