Skip to content

Mac Installation Tutorial

ochawkeye edited this page Jun 5, 2013 · 3 revisions

This tutorial will hopefully teach you the basics of installing everything you need to make nflgame work on your OSX machine.

The PreReq to The PreReqs

One program that should be installed before all else is gcc. We'll be working with a lot of pre-built packages, but it's better safe-than-annoyed.

Firstly, open terminal. Usually found in /Applications/Utilities, but also easily found by typing "terminal" into spotlight.

Type "gcc" and hit enter. If terminal responds with "gcc: command not found" it's time to install it.

If you have your OSX disks handy, you can install XCode, which will also install a bunch of developer tools, one of which is gcc. If you don't want to dig the disks out of a shoebox in your closet, you have a few options: A) Downloading Xcode from the lovely App Store, or B) Following this link to install the gcc package itself. If you're using a version of OSX older than 10.6 (why?) then you'll need to go with option A.

Checking for python

Next, at the command line, type "python":

patsrule:~ brady$ python
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

As you can see, I have the (slightly outdated) Python version 2.7.1. If you get a message along the lines of:

python: command not found.

you'll need to install it.

Go to the Python download page and select the version that corresponds to your computer. For most, this is probably the 10.6/10.7 version. The install package is really well constructed and does all the heavy lifting for you. After it is done, try typing "python" into terminal again. You should now see something along the lines of my above example.

Type "quit()" to get out of the python prompt and back into bash.

Installing pip

Next we're going to install a helper program called "pip". If you didn't have python, you probably don't have pip, and if you did have Python you probably still don't have pip.

From the command line, type the following:

curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python

This will download the pip setup script, and then execute it. Use your admin password to authenticate, since we're using sudo.

If there are no errors, when you type pip, good things will happen.

patsrule:~ brady$ pip
Usage: pip COMMAND [OPTIONS]
You must give a command (use "pip help" to see a list of commands)

Installing nflgame

What we really came here for. Because we downloaded pip this is incredibly easy.

sudo pip install nflgame

Type that and authenticate again, and you should be all set.

patsrule:~ brady$ python
Python 2.7.1 (r271:86832, Jul 31 2011, 19:30:53) 
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import nflgame
>>> 

Updating nflgame

From time to time a new version of nflgame is released. With pip staying up-to-date is easy.

sudo pip install --upgrade nflgame

Smells like victory.