Logo Iris 1.3

Table Of Contents

Previous topic

Iris documentation table of contents

Next topic

Iris user guide

This Page

Installing Iris

Installing Iris currently requires you to build it from source. The latest release is available from https://github.com/SciTools/iris.

Iris makes use a range of other libraries and python modules. These dependencies must be in place before you can successfully install Iris. Once you have satisfied the requirements detailed below, extract the iris source package, cd to the new directory, and enter:

python setup.py install

In-place build - an alternative for developers

We strongly encourage people to contribute to Iris and for this type of development activity an in-place build can be useful. Once you’ve cloned the Iris git repository you can perform an in-place build by entering:

python setup.py std_names
python setup.py build_ext --inplace

Details of other setup.py options and commands can be found by entering:

python setup.py --help

and:

python setup.py --help-commands

Build requirements

These are external packages which you will need to install before installing Iris.

Many of these packages are available in Linux package managers such as aptitude and yum. For example, it may be possible to install Numpy using:

apt-get install python-numpy

If you are installing dependencies with a package manager on Linux, you may need to install the development packages (look for a “-dev” postfix) in addition to the core packages.

python 2.7 or later (http://www.python.org/)
Iris requires Python 2.7 or later, but is not currently compatible with Python 3.
numpy 1.6 or later (http://numpy.scipy.org/)
Python package for scientific computing including a powerful N-dimensional array object.
scipy 0.10 or later (http://www.scipy.org/)
Python package for scientific computing.
udunits2 2.1.24 or later (http://www.unidata.ucar.edu/software/udunits/udunits-2/udunits2.html)
C library for units of physical quantities.
netcdf4-python 0.9.9 or later (http://netcdf4-python.googlecode.com/)
Python interface to the netCDF version 4 C library.
PyKE 1.1.1 or later (http://pyke.sourceforge.net/)
Python knowledge-based inference engine.
setuptools 0.6c11 or later (http://pypi.python.org/pypi/setuptools/)
Python package for installing/removing python packages.
cartopy 0.5.0 or later (http://github.com/SciTools/cartopy/)
Python package which provides cartographic tools for python.

Optional

These are optional packages which you may want to install to use Iris with different file formats and to enable plotting functionality. All of these are required for the Iris test suite to run.

graphviz 2.18 or later (http://www.graphviz.org/)
Graph visualisation software.
grib-api 1.9.16 or later (http://www.ecmwf.int/products/data/software/download/grib_api.html)
API for the encoding and decoding WMO FM-92 GRIB edition 1 and edition 2 messages. A compression library such as Jasper is required to read JPEG2000 compressed GRIB2 files.
matplotlib 1.2.0 (http://matplotlib.sourceforge.net/)
Python package for 2D plotting.
mock 1.0.1 (http://pypi.python.org/pypi/mock/)
Python mocking and patching package for testing. Note that this package is only required to support the Iris unit tests.
nose 1.1.2 or later (http://nose.readthedocs.org/en/latest/)
Python package for software testing. Iris is not compatible with nose2.
PythonImagingLibrary 1.1.7 or later (http://effbot.org/zone/pil-index.htm)
Python package for image processing.
shapely 1.2.14 (https://github.com/Toblerity/Shapely)
Python package for the manipulation and analysis of planar geometric objects.

Packed PP

The libmo_unpack library can be used by Iris for decoding/unpacking PP files or Fields files that use an lbpack value of 1 or 4. This library is open source, licensed under the 2-clause BSD licence. It can be obtained from http://puma.nerc.ac.uk/trac/UM_TOOLS/wiki/unpack.

Use of this library is not enabled by default. If this library is available its use can be enabled by installing Iris with the following command:

python setup.py --with-unpack install

Note that if this library and/or its associated header files are installed in a custom location then additional compiler arguments may need to be passed in to ensure that the Python extension module linking against it builds correctly:

python setup.py --with-unpack build_ext -I <custom include dir> \ 
      -L <custom link-time libdir> -R <custom runtime libdir> install

Custom site configuration

The default site configuration values can be overridden by creating the file iris/etc/site.cfg. For example, the following snippet can be used to specify a non-standard location for your udunits library:

[System]
udunits2_path = /path/to/libudunits2.so

An example configuration file is available in iris/etc/site.cfg.template. See iris.config() for further configuration options.

Packaged distributions

The Enthought Python Distribution (EPD) for Windows, OS X or Redhat provides some of the dependencies for Iris as does Python (x, y) which tends to be updated a bit more frequently.