wiki:InstallationLinuxPrepackaged

Installation using Prepacked Modules

Back to Installation on Linux

Installing Dependencies using the package manager on Linux

The following installations should work if your distribution ships Python >=2.5 and numpy >=1.1. Install the required dependencies via your package manager, e.g. on..

  • Debian/Ubuntu
    sudo apt-get update
    sudo apt-get install python
    sudo apt-get install python-dev
    sudo apt-get install python-setuptools
    sudo apt-get install python-numpy
    sudo apt-get install python-scipy
    sudo apt-get install python-matplotlib
    sudo apt-get install python-lxml
    sudo apt-get install ipython         # strongly recommended, not necessary
    #sudo apt-get install python-omniorb # only needed for deprecated module obspy.fissures
    
  • openSUSE
    sudo zypper update
    sudo zypper install python
    sudo zypper install python-devel
    sudo zypper install python-setuptools
    sudo zypper install python-numpy
    sudo zypper install python-numpy-devel
    sudo zypper install python-scipy
    sudo zypper install python-matplotlib
    sudo zypper install python-matplotlib-tk
    sudo zypper install python-lxml
    sudo zypper install IPython             # strongly recommended, not necessary
    #sudo zypper install python-omniORB     # only needed for deprecated module obspy.fissures
    

Installing ObsPy

It is recommended to execute the following commands in an virtual environment (see NoRootEasyInstall) which ships distribute, a dependency of ObsPy. Alternatively you can also execute the following commands as root, however you then need to install distribute before hand (run sudo easy_install distribute).

First, make sure the version of distribute is recent enough (the current developer version needs at least version 0.6.21):

easy_install -U distribute

If you are working with an virtual Python environment the above might fail and you have to install distribute from source (see also  here):

cd /tmp
curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.24.tar.gz
tar -xzvf distribute-0.6.24.tar.gz
cd distribute-0.6.24
python setup.py install --prefix=/path/to/virtual/environment  # e.g. --prefix=$HOME/local

For installing a basic package able to handle GSE2, SAC and MSEED files run on the following commands:

easy_install -N obspy.core
easy_install -N obspy.mseed
easy_install -N obspy.sac
easy_install -N obspy.gse2
easy_install -N obspy.imaging

Additional modules of ObsPy may be installed by calling easy_install followed by the module name.

easy_install -N obspy.signal
easy_install -N obspy.arclink
easy_install -N obspy.xseed
easy_install -N obspy.seishub
easy_install -N obspy.seisan
easy_install -N obspy.wav
easy_install -N obspy.fissures
easy_install -N obspy.sh
easy_install -N obspy.taup

Packages may be updated using the -U option:

easy_install -N -U obspy.core

Note

  • -N: Option will prevent easy_install to resolve the dependencies on its own (useful if dependencies are already installed).
  • ==dev: The latest development version can be obtained by adding ==dev to the package name, e.g. easy_install -N obspy.sac==dev.
  • Developers might be interested in directly linking their svn checkout to the python site-packages. A description can be found here: InstallationLinuxDevelop