Installation

Using Anaconda

The easiest and recommended way to install Gammapy is to install the Anaconda distribution. The installation is explained in the Quickstart section.

Using pip

To install the latest Gammapy stable version (see Gammapy page on PyPI) using pip:

$ python -m pip install gammapy

To install the current Gammapy development version using pip:

$ python -m pip install git+https://github.com/gammapy/gammapy.git#egg=gammapy

Or like this, if you want to study or edit the code locally:

$ git clone https://github.com/gammapy/gammapy.git
$ cd gammapy
$ pip install .

How to get set up for Gammapy development is described here: Get set up

Using other package managers

Gammapy has been packaged for some Linux package managers. E.g. on Debian, you can install Gammapy via:

sudo apt-get install python3-gammapy

To get a more fully featured scientific Python environment, you can install other Python packages using the system package manager (apt-get in this example), and then on top of this install more Python packages using pip.

Example:

sudo apt-get install \
    python3-pip python3-matplotlib \
    ipython3-notebook python3-gammapy

python3 -m pip install antigravity

Note that also on Linux, the recommended way to install Gammapy is via conda. The conda install is maintained by the Gammapy team and gives you usually a very recent version (releases every 2 months), whereas the Linux package managers typically have release cycles of 6 months, or yearly or longer, meaning that you’ll get an older version of Gammapy. But you can always get a recent version via pip:

sudo apt-get install python3-gammapy
pip install -U gammapy