Second Edition Mac Installation with Homebrew
These instructions are for the Second Edition of Hello World!. If you’re using the Third Edition, there’s an easy-to-use software package available for download at helloworldbook3.com.
Because Homebrew no longer supports Python 2, these instructions might not work correctly anymore.
We previously offered an installer package for Mac OS X that downloaded and installed all necessary modules and software. Unfortunately, changes to recent versions of OS X have caused our installer to no longer work properly, so to install Python and all the modules required by the book, we now recommend using a program called Homebrew. Homebrew is a package manager for Macs. In other words, it’s a way to install, update, and uninstall software. Here’s how you use Homebrew to install the book’s software:
- Install Homebrew by opening Terminal, copy-pasting in the following command, and pressing Return:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Note: at the “Password:” prompt, type the password you use to log in to your computer. You won’t see anything appear on the screen; this is normal for security reasons.
- Run these commands in Terminal to install everything you need:
brew install cp4k/hello-world-2/hello-world-2 finish-hello-world-2-installation.py
Then, you’ll have all of the software you need for the book. (Note: Homebrew won’t download the book’s sample code for you. You can get the One Big Zip File on our book’s website.)
If you have any questions about installing the software needed to use our book on OS X, or if something isn’t working right, don’t hesitate to email us at firstname.lastname@example.org .
[Updated Nov 26 2015 to use our own Homebrew package that fixes issues with Pygame on OS X El Capitan. Also, the original Qt Designer now gets installed to your Applications folder instead of Qt Creator.]
[Updated Dec 26 2015 to clarify the Homebrew installation instructions.]
[Updated May 5 2016 to clarify what you need to do at the “Password:” prompt.]
[Updated March 1 2017 to switch to using our own special script instead of the deprecated
brew linkapps command].