Numerical Analysis -- Help Pages
MCNAcourses ▸ NA-Help –

Before you start

Python together with its Modules Scipy, Numpy and Matplotlib are used in a couple of courses in Numerical Analysis in Lund.
Here we advice how to install and run Python on your home computer. We work with Python versions 3.*, e.g. Python 3.4 . Note that there are differences between Python 2.* and Python 3.* which may make some of the examples in our courses not work correctly if you have the wrong (old) version of Python installed. Before you install check if your system uses a 64 bit operative system or a 32 bit system. Most modern computers work with a 64 bit system.


The most convenient way is to install Python from the Anaconda Scientific Python Distribution which includes all modules you might need for scientific computing and the workbench (editor) Spyder. Download the installer here and follow the platform specific installation instructions on the download page. The distribution is free, but you have to provide your e-mail adress.

Configuration of Spyder

  • Open Spyder and go to Tools --> Preferences --> Global Working Directory
    Give the details about the directory you use to work in.
  • Open Spyder and go to Tools --> Preferences --> Editor --> Advanced Settings
    Select Edit templates for new Modules
    The template file will be opened. Modify it so that it looks like
    # -*- coding: utf-8 -*-
    Created on %(date)s
    @author: %(username)s
    from  scipy import *
    from  pylab import *
    Save and quit it.
  • Open Spyder and go to Tools --> Preferences --> IPython console --> Startup
    an change the Run code section as in the following picture:
    Spyder Preferences