Skip to content
David R. Pugh edited this page May 17, 2014 · 19 revisions

XCode Tools with Command-Line options

This first bit is for Mac OSX users ONLY! If you have a Windows or Linux machine, skip this section and go straight to installing a Python distribution.

Prior to installing the software below you will want to optimize your Mac for scientific computing and software development by installing XCode Developer Tools with Command-Line Options.

  1. XCode Developer Tools is available via the App Store: visit the App store and search for "XCode", and then download and install the XCode Developer Tools App (this may take a while as the file is large!).
  2. Next you need to install Command-Line Tools. Command-Line Tools is an optional add-on to XCode Developer Tools. Open XCode and visit the Components tab of the Downloads preferences panel within XCode preferences. You should see a number of optional add-ons to install, one of which will be Command-Line Tools. Check the box next to Command-Line Tools and install it.

If you get stuck, remember that Google is your friend! Of course, I am also your friend and if you really get stuck, you can always shoot me an email...

Installing a Python distribution

Although most computers come with a base Python distribution pre-installed, we are going to use the Enthought Canopy distribution (which is free for academic use). You will need to register for an account with Enthought using you University email address (unless of course you already have an account!). Enthought will send you an email with a link which you need to click in order to validate your account. You should then confirm that you have an Academic license for Enthought Canopy before proceeding to the downloads page. Detailed instructions for installing Canopy on Windows, Mac OSX, and Linux users are available.

Installing version control software

Proper version control is a critical component of doing high quality, reproducible, computational work. Although there are many alternatives, we are going to use Git. Git is an excellent, distributed (i.e., good for collaborative research!) version control system.

You can download both the bash shell version and a Windows GUI version from the Git downloads website. During the installation, you will be asked if you want to add git to your system path so that it can be accessed directly from the command line. Make sure to select this option during the install process. Finally, after downloading and installing Git, you may want to set up a GitHub account.

Sublime text editor

There are many good (and free) text editors available and on this course we are going to use Sublime Text 3 (Note that if you have an ancient Mac like mine you are stuck with Sublime Text 2!). After downloading Sublime Text, you will need to install the Sublime text Package Control in order to be able to install all the cool plugins that make Sublime such a powerful text editor.

After installing Sublime Package control, you should install the following packages:

  1. SublimeGit: Git integration for Sublime Text. Installation instructions and a tutorial are available.
  2. SublimeLinter3: Provides code ``linting'' (i.e., checks your code for syntax errors as your write it). SublimeLinter will also tell you if you have violated the Python style guide.
  3. LaTexTools: (OPTIONAL) Extremely useful if, like me, you write almost everything in LaTeX. Detailed installation instructions are available on the project's GitHub page. More succinct instructions for Mac OSX users are available here.