Steps to Get Ready for the Tutorial
- Install the necessary Python binaries and libraries
- Test the installation with the given examples
- List of required software
This tutorial will use the NumPy, SciPy, and Matplotlib libraries. All software used in this tutorial is open-source and freely available for download.
The following installation instructions were tested in Windows XP.
- Download Python(x,y) 188.8.131.52
- Run the downloaded binary.
- If prompted, install the "recommended" version of Python(x,y)
- Download Enthought Python Distribution 6.1-1
- Open the downloaded installation image.
- Run the "EPD.mpkg" installer in the downloaded image (Note: The EPD package is free for all acacdemic users)
All the software needed can be installed from the command line in Linux.
Installation in Ubuntu can be done with the Synaptic GUI, or ...
Ubuntu 10.04 command line instructions
- sudo apt-get install build-essential
- sudo apt-get install python
- sudo apt-get install python-numpy python-scipy
- sudo apt-get install python-matplotlib
- sudo apt-get install ipython
Fedora 12 command line instructions
- sudo yum install python
- sudo yum install numpy scipy
- sudo yum install matplotlib
- sudo yum install ipython
To test that your python software is installed correctly, enter the sample code below into iPython.
Note: All code snippets taken from IPython have the formatting "In [number]: <Code user enters>". The "In [number]:" is a prompt provided by IPython.
- Double-click on the "Python (x,y)" link that should be on the Desktop.
- Click on either button next to the "IPython(x,y)" dropdown list under the "Interactive consoles:" section.
- Enter the sample code below and see that the resulting figure matches
- In "Applications", open the EPD-6.1 folder
- Run the "PyLab (IPython)" application
- Enter the sample code below and view the figure
- Open a terminal
- Enter the sample code below and view the figure.
Enter the following in iPython:
In : import numpy
In : import scipy
In : import matplotlib
In : import pylab
In : a=[1,2,3]
In : b=[1,2,3]
In : pylab.figure()
In : pylab.plot(a,b)
This code sample should produce a window that looks like this:
The software used in this tutorial is:
- Python 2.6
- Numpy 1.4
- SciPy 0.7
- Matplotlib 0.99...
Python(x,y) is a free scientific and engineering development software for numerical computations, data analysis and data visualization based on Python programming language, Qt graphical user interfaces, Eclipse integrated development environment and Spyder interactive scientific devleopment environment.
Python(x,y) is designed and tested to work with Windows XP, Vista, and Windows 7. It includes are large number of libraries and binaries including integrated development environments (IDEs), C and Fortran compilers, Python libraries for scientific computation and visualization, and documentation about the software included.
The Enthought Python Distribution (EPD) provides a comprehensive, cross-platform environment for scientific computing with the Python programming language.
The EPD includes installers for Windows, Mac, Solaris, and Linux. Enthought, Inc. sells support and training for these packages.