Installation Instructions

Step 1

Download the full Python Distribution from the following URL:

http://www.enthought.com/products/edudownload.php

Windows specific instructions

  • download the file above, but choose "save" instead of "open"
  • once the file is downloaded, open it and choose "install for this user only"
  • accept all the shortcuts that the installer suggests
  • if you do not end up with a shortcut named "PyLab" on your Desktop, create a new shortcut associated with the command C:\Python26\python.exe -c "import sys; from IPython.ipapi import launch_new_instance; sys.exit(launch_new_instance())" -pylab

To be able to run the code provided in the first programming lecture, you should set up your system by following the steps below.

Step 2

Create a new file called allscipy.py with the following contents:

# plotting:
from pylab import *
# general matrix/vector tools:
from numpy import *
# linear algebra:
from numpy.linalg import *
# various random functions:
from numpy.random import *
# general numerical analysis tools:
from scipy import *
# integration of functions and ode:
from scipy.integrate import *
 
# copying tools
from copy import copy, deepcopy

Put it in at the same location where you have the file PyLab on Windows.

Step 3

Now create a Python file at the same location as allscipy.py, starting with

from __future__ import division
from allscipy import *
 
<put your code here>

Start a Python shell by either running PyLab on Windows, or by typing ipython -wthread in a terminal on Linux/Mac OS X.

Step 4

You may execute your file, say myfile.py by running execfile('myfile.py') in the Python shell.

Editor

It is very important that you choose an editor which you are comfortable with, and which is Python-savvy.

For Windows, I would advise using Notepad++. For Linux, there is for instance Kate or geany, which are often installed by default. For Macintosh, I advise Textmate, although it is not a free alternative.

2011-01-18, Olivier Philippe Paul Verdier