How to Install Python as a Replacement to Matlab
Python has matured to the point where it is a very powerful computational environment with flexibility that is unmatched by any commercial product. But this flexibility comes at the cost of a very fragmented install procedure. The default installation of python is feature poor and the needed features for computations are spread out over many different packages. For windows there is the Enthought editionwhich combines many useful packages into one install. As of this writing the Unix/Linux installation is less user friendly and requires many dependencies.
The approach taken here is supported by the idea that the most complete, stable, fastest and up to date installation comes from compiling the latest sources. To simplify the process I supply a shell scriptthat does all of the necessary commands for you. Please be advised that this works for my system and might need to be modified for your special needs.
Relevant Packages:
- ATLAS – Automatically Tuned Linear Algebra Software. (speeds up SciPy and Numeric)
- Numeric – Also known as numpy or numerical Python (required by SciPy)
- F2PY – Fortran to Python interface generator (required by SciPy)
- SciPy – Library of scientific tools
- Vpython - 3D Programming for Ordinary Mortals
- Matplotlib – 2D plotting library with similar syntax to Matlab
- IPython - An enhanced Interactive Python shell
- Other interesting links and packages not installed
- Install Script – Shell script that downloads and installs above files
- VTK – 3D Visualization Toolkit
- MayaVi – Data Visualization Tool
- BioPython – Computational tools for Molecular Biology
Install ATLAS
Follow instructions at www.scipy.org or run script
Numerical Python (Numpy)
- Get latest tar ball of numpy (Numeric-23.7.tar.gz)
- Untar the tarball: tar xfvz Numeric-23.7.tgz
- Do the usual: python setup.py install
F2PY
- Download the latest tar ball F2PY-2-latest.tar.gz
- Untar file: tar xfvz F2PY-2-latest.tar.gz
- Do the usual: python setup.py install
SciPy
Follow instructions from http://www.scipy.org/documentation/buildscipy.txt summarized below.
- Download latest tar ball (SciPy_complete-0.3.2.tar.gz)
- Define location of atlas: export ATLAS=/usr/lib/atlas
- Untar file: tar xfvz SciPy_complete-0.3.2.tar.gz
- Do usual: python setup.py build
- Followed by: python setup.py install
Vpython
- Make sure gtkglarea is installed
- Download latest tarball visual-3.1.0.tar.bz2
- Untar file: tar xfvj visual-*
- Run command: ./configure –prefix=/usr
- Followed by: make
- Followed by: make install
Matplotlib
- Download latest tarball: (matplotlib-0.71.tar.gz)
- Untar file: tar xfvz matplotlib*
- Do usual: python setup.py build
- Do usual: python setup.py install
IPython
- Download latest file: (ipython-0.6.10.tar.gz)
- Untar file: tar xfvz ipython*
- Do usual: python setup.py install
[via: Larsson Omberg]

