The regions package requires the following packages:

  • Python 2.7 or 3.4 and above
  • Numpy 1.9 or later
  • Astropy 1.3 or later

In addition, the following packages are needed for optional functionality:

Stable version

Installing the latest stable version is possible either using pip or conda.

Using pip

To install regions with pip from PyPI, run:

pip install regions --no-deps


The --no-deps flag is optional, but highly recommended if you already have Numpy installed, since otherwise pip will sometimes try to “help” you by upgrading your Numpy installation, which may not always be desired.

Using conda

To install regions with Anaconda from the astropy channel on simply run:

conda install -c astropy regions

Testing installation

To check if there are any issues with your installation, you can run the tests:

python -c 'import regions; regions.test()'

Development version

Install the latest development version from :

git clone
cd regions
python install

To run the tests, you will need to make sure the pytest-arraydiff package is installed. Then, run the tests with:

python test

To build the documentation, do:

python build_docs