Pygame for the brave and adventurousWordCount: 249
Pygame has some trouble running on certian OS X configurations, and tends to do some funny things on retina macs, this is a quick run-down of installing pygame from source.
This assumes a working knowledge of the terminal.
We are going to use some handy software to get pygame installed:
- homebrew a package manager for OSX. quite simply it lets us install software and tools from the terminal
- pip a package manager for python, its used to install lots of useful python libraries.
First we need homebrew, so pop the command from the site —
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
— into your terminal and follow the prompts.
Next we need pip, following the linked site is probably a good idea, but the gist is to download this file and run:
In order to get all the right versions of pygame and it’s dependencies we need a little program called mercurial, used for managing source code, so run:
brew install mercurial
Next we need to install some dependencies for pygame:
brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi
And finally pygame itself:
sudo pip install hg+http://bitbucket.org/pygame/pygame
The sudo command tells the system that we want to make changes as a kind of “super-administrator”, and is needed for pip to install things.
And with that everything should work fine.