Getting started with Python

This guide should give you a good overview of the packages you’ll need to download and install to start scientific programming using Python.

First, Python itself.  Python 2.7 is the latest version, and it works with the majority of toolkits you’ll need.

So, here it is:

http://python.org/download/releases/2.7.2/

You’ll also need the numerical extensions to python, NumPy (which lets you use arrays and matrices) and SciPy (which has lots of useful functions for integration, linear algebra, Fourier analysis and so on).

Luckily there are ready-made installers of both of these for both mac and windows:

Those for NumPy can be found here at
(For direct download of the 2.7 compatible version, you can use this link for mac or this one for windows)
.
And SciPy is  here (Or you can use the direct downloads of the 2.6 compatible version  for a mac or for windows)
.
If you want to do any plotting or visualisations you’ll need Matplotlib too. It’s very similar to matlab in its syntax and an overall delight to use. Find it here (Or directly download the 2.6 compatible version for windows and mac ).
.
NetworkX is another handy plugin for dealing with everything to do with networks. The easiest possible way to set it up is with another piece of software called easy install (documentation of which can be found here). I have a feeling (don’t quote me) that this comes pre-loaded on the mac,  but for windows, you can access the download page here or just download it directly.
.
Once that’s done, open up a terminal window (start>run>”cmd” for windows) and use the command ”easy_install networkx”. ‘Tis as simple as that.
.
Since my work is in a global dynamics project, I often have to produce plots overlaid on maps. For that matplotlib has a handy little toolbox called Basemap. The sourceforge page includes a lovely windows installer, unfortunately though, there’s no such thing for mac users. I have managed to set up basemap on my mac, but cannot for the life of me remember how. I know it took a long time to work it out, and I know I used this guide, which was about as useful as a chocolate teapot, but other than that you’re on your own I’m afraid.