Before the tutorial, I want to point out a few of the best authors of “beginning python” books. The first is Al Sweigart, who not only sells his book in print on Amazon, but also offers them for free on his website. His three beginning python books, Invent You Own Computer Games with Python, Making Games with Python & Pygame, and Hacking Secret Ciphers with Python can be found for free in PDF here. If you want to purchase the print versions, go here. Another author is Jason Briggs, whose book Python for Kids can be found here. The last author in our spotlight, Professor Craven, has an incredible website called Program Arcade Games with Python and his book on the same subject can be found here. All of these books are written for Python 3 programming.
You can find a great writeup about Pycharm 3 CE, the best free IDE you can get for Python here.
Now about the tutorial. All of the credit for this goes to Julian at albrecht.cn. He did all of the heavy lifting. I just corrected a few things and cleaned it up a little. Please note, there are two command line entries that I had to break into two lines because I like my ridiculously narrow blog. I noted them in the tutorial and reminded you to enter them on one line. Here we go:
Install the Xcode Command Line Tools from Apple or from here.
Install Quartz from here
Install Homebrew and necessary tools:
ruby -e “$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)”
brew install python3 (this currently installs version 3.3.3)
brew install mercurial
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
brew install –HEAD smpeg
*** If you get an error here then type this on one line ***
brew install –HEAD
Make sure you are using TWO ‘-’ (dashes) in front of HEAD.
Clone the pygame repository:
hg clone https://bitbucket.org/pygame/pygame
Copy this file into src, replacing the one there.
Now install pygame by typing this on one line:
That’s it. If this tutorial helped you, please follow me on twitter @dudeslife .