Getting started: the basic bits of kit

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.  There are later versions than the 2.6 which I use but:

a) they can have some compatibility issues when installing other toolkits

b) unless you really know what you’re doing, 2.6 is capable of basically everything you’ll ever want to do.

So, here it is:

http://www.python.org/download/releases/2.6.6/

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.6 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.
Advertisement

~ by hannahfry on March 6, 2011.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: