Here are some notes on getting and learning Python.
Getting:
For Windows: The Enthought Python Distribution is free for “educational users at degree-granting institutions”. It includes numpy, scipy, and matplotlib. Go to the Enthought Download Page and get it if you are eligible. Install it by double-clicking and then clicking ‘Ok’ until it stops asking for approval. Then download and install the PyMC windows installer from the PyMC Downloads Page. Alternative approach: get packages you need individually here.
For Ubuntu or Debian: Type the following into a terminal:
sudo apt-get install ipython python-setuptools python-dev python-nose python-tk python-numpy python-matplotlib python-scipy python-networkx gfortran libatlas-base-dev sudo easy_install pymc
Testing:
Type ipython --pylab to start interactive python, or find the icon in the start menu. To make PyMC run its self-tests, do this:
import numpy numpy.test() import pymc pymc.test()
Hmm, my PyMC doesn’t have any tests…
Learning
:
To quickly get going in Python read this and this:
If you have used Matlab before then skim this:
Other resources:
More resources:
http://www.greenteapress.com/thinkpython/thinkpython.html
http://www.pythonlearn.com/book.php
Other resources that I’ve found useful:
SciPy 2010 intro tutorial slides: http://conference.scipy.org/scipy2010/misc/intro_tutor_data.zip
A Primer on Scientific Programming with Python:
Book: http://www.springerlink.com/content/978-3-642-02474-0
Slides (the page is in Norwegian, but the slides aka ‘foils’ are in English): http://www.ifi.uio.no/~inf1100/foiler/
Learn Python the Hard Way http://learnpythonthehardway.org/index
Programming for Scientists http://luispedro.org/projects/pfs
Python and a number of other wonderful things for scientists to know about software engineering: http://software-carpentry.org/