Installation from Source Linux Unix Mac
Back to Installation on Linux
In case your Python is too old, you still have the possibility of compiling your local Python source tree, which is described in the following:
Python
Download the Python (2.6.3) tar ball from http://www.python.org/download. Install the
Dependencies: libreadline5-dev sqlite3 libsqlite3-dev tk8.5 tk8.5-dev tcl8.5 tcl8.5-dev gcc-4.3 (older tk/tcl libraries plus developer versions do it also)
mkdir -p $HOME/local/src cd $HOME/local/src tar -xzf /path/to/Python2.6.tgz cd Python 2.6 ./configure --prefix=$HOME/local --enable-unicode=ucs4 && make && make install export PATH=$HOME/local/bin:$PATH
Note: Do not forget to set the PATH, all the following commands need to be executed by the new local python. The unicode option is needed as NumPy uses 4 bytes unicode and Python interpreter defaults on 2 bytes unicode.
easy_install
All the following packages are installed via Distribute easy_install. Currently there is no official installer for the Distribute package. But you may just download and run from command line the Python script http://python-distribute.org/distribute_setup.py (0.6.6).
wget http://nightly.ziade.org/distribute_setup.py python distribute_setup.py
All the following packages are installed via easy_install into your local Python tree. The packages (called eggs) are installed your local python site-packages directory $HOME/lib/python2.6/site-packages. All installed packages are listed in $HOME/lib/python2.6/site-packages/easy-install.pth. For deinstallation of a package, remove it's entry from the easy_install.pth and delete the corresponding egg file from the site-packages directory.
NumPy
The installation of NumPy directly via PyPi? is often problematic. The better way is to localy compile the package and the local binary via easy_install to the correct place. Download the NumPy tar ball from http://sourceforge.net/projects/numpy/files (1.3.0).
Dependencies: fftw3 fftw3-dev libatlas3gf-base libatlas-base-dev libatlas-headers gfortran (any other fortran compiler and headers, developer versions of lapack and blas do it also)
cd $HOME/local/src tar -xzf /path/to/numpy-1.3.0.tar.gz cd numpy-1.3.0 python -c 'import setuptools; execfile("setup.py")' bdist_egg easy_install dist/numpy-1.3.0-py2.6-linux-i686.egg
SciPy
As for NumPy it is better to compile SciPy locally and install it via easy_install. Download the SciPy tar ball from http://sourceforge.net/projects/scipy/files (7.1.0).
Dependencies: as NumPy plus g++ (4.3)
cd $HOME/local/src tar -xzf /path/to/scipy-7.1.0.tar.gz cd scipy-7.1.0 python -c 'import setuptools; execfile("setup.py")' bdist_egg easy_install dist/scipy-0.7.1-py2.6-linux-i686.egg
matplotlib
As for NumPy and SciPy it is less problematic to compile [] locally and install it via easy_install. Download the SciPy tar ball from http://sourceforge.net/projects/matplotlib/files/matplotlib/ (0.99.1.1).
Dependencies: libfreetype6 libfreetype6-dev libpng12-0 libpng12-dev zlib1g zlib1g-dev pkg-config
cd $HOME/local/src tar -xzf /path/to/matplotlib-0.99.1.1.tar.gz cd matplotlib-0.99.1.1 vi setup.cfg # comment wxagg and macosx python -c 'import setuptools; execfile("setup.py")' bdist_egg easy_install dist/matplotlib-0.99.1.1_r0-py2.6-linux-i686.egg
lxml, IPython
lxml (2.2.2) and IPython (0.10) are mostly unproblematic to install, just grab and install them from PyPi.
Dependencies: libxml2 libxml2-dev libxslt1.1 libxslt1-dev zlib1g zlib1g zlib1g-dev
easy_install ipython==0.10 easy_install lxml==2.2.2
(Remove ==version to install the latest version of lxml or ipython).
ObsPy
Continue with InstallationLinuxPrepackaged#InstallingObsPy.
