python

Installing Pygame for Python 3 on Mac OS Yosemite

It's somewhat difficult to find instructions on how to successfully install Pygame for Python 3 on Yosemite. The front page of the Pygame website has a link which appears to point to installation instructions, but it is broken.

Fortunately, someone posted these instructions on the Pygame wiki:

Firstly, ensure you have the Apple Xcode command line tools installed:

xcode-select --install

Install XQuartz from http://xquartz.macosforge.org/landing/. Restart your computer so the newly installed XQuartz is used.

Make sure you have homebrew installed:

Installing Pygame on Mac OS 10.8 Mountain Lion

I decided to install and play around with Pygame today, mainly as an excuse to write some Python for a minor departure from all the Javascript/Coffeescript I've been writing lately. Unfortunately the process wasn't entirely frictionless, due to Pygame not yet accounting for Apple's move to XQuartz as the recommended X11 implementation for Mac OS as of 10.8 Mountain Lion. As a result I ran into some compilation errors while Pygame was building it's native extensions, which fortunately were not too hard to fix as I had some familiarity with changes to X11 on Mountain Lion.

Subscribe to RSS - python