$$ \newcommand{\Oof}[1]{\mathcal{O}(#1)} \newcommand{\F}{\boldsymbol{F}} \newcommand{\J}{\boldsymbol{J}} \newcommand{\x}{\boldsymbol{x}} \renewcommand{\c}{\boldsymbol{c}} $$




Required software

The strictly required software packages for working with this book are

Desired add-on packages are
Python 2 or 3? Python comes in two versions, version 2 and 3, and these are not fully compatible. However, for the programs in this book, the differences are very small, the major one being print, which in Python 2 is a statement like

print 'a:', a, 'b:', b

while in Python 3 it is a function call

print( 'a:', a, 'b:', b)

The authors have written Python v2.7 code in this book in a way that makes porting to version 3.4 or later trivial: most programs will just need a fix of the print statement. This can be automatically done by running 2to3 prog.py to transform a Python 2 program prog.py to its Python 3 counterpart. One can also use tools like future or six to easily write programs that run under both versions 2 and 3, or the futurize program can automatically do this for you based on v2.7 code.

Since many tools for doing scientific computing in Python are still only available for Python version 2, we use this version in the present book, but emphasize that it has to be v2.7 and not older versions.

There are different ways to get access to Python with the required packages:

  1. Use a computer system at an institution where the software is installed. Such a system can also be used from your local laptop through remote login over a network.
  2. Install the software on your own laptop.
  3. Use a web service.
A system administrator can take the list of software packages and install the missing ones on a computer system. For the two other options, detailed descriptions are given below.

Using a web service is very straightforward, but has the disadvantage that you are constrained by the packages that are allowed to install on the service. There are services at the time of this writing that suffice for working with most of this book, but if you are going to solve more complicated mathematical problems, you will need more sophisticated mathematical Python packages, more storage and more computer resources, and then you will benefit greatly from having Python installed on your own computer.