Installing via Anaconda

Anaconda (you can also use Miniconda for a smaller footprint) is a scientific Python installation shipping with essentially all needed packages. Install it according to the instructions on their homepage. You can use any Anaconda Python version. An Anaconda Python installation is completely separate from any existing system wide or user space Python installation, so Anaconda can be tested without the fear of breaking an existing installation.

Anaconda GammaLib packages exist for Mac OS X and Linux distributions. Windows is not supported.


  • Install Anaconda following the instructions on their site

  • Add the conda-forge and cta-observatory channels to your Anaconda configuration

    $ conda config --append channels conda-forge
    $ conda config --append channels cta-observatory
  • We strongly recommend to work with separate Anaconda environments, and especially not use the special root environment (that is used for all conda commands and environment manipulations, package installations etc.) for anything besides updating the conda package itself. For example create a myenv environment as follows:

    $ conda create -n myenv python=2.7  # or e.g. python=3.5
    $ source activate myenv
    (myenv) $
  • Install pre-compiled GammaLib conda package from Anaconda cloud with:

    (myenv) $ conda install gammalib

    This will also install the required dependencies, and in particular cfitsio.

  • Re-activate your environment to initialise the GammaLib environment variables

    (myenv) $ source activate myenv


Type the following to test the GammaLib package

(myenv) $ python -c 'import gammalib; gammalib.test()'


Type the following to update the GammaLib package

(myenv) $ conda update gammalib

or (if you did not add the cta-observatory channel to your default channels):

(myenv) $ conda update -c cta-observatory gammalib