Required dependencies

Optional dependencies

For plotting

  • matplotlib is required to create any plots.

  • cartopy for plotting on geographical maps and for downloading natural earth data.

For faster masking

  • pygeos enables faster mask creations for irregular and 2D grids.


regionmask itself is a pure Python package, but its dependencies are not. The easiest way to get them installed is to use conda. The package is available on the conda-forge channel.

conda install -c conda-forge regionmask cartopy pygeos

All required dependencies can be installed with pip. You can thus install regionmask directly:

pip install regionmask

Note, however, that the optional dependency cartopy can be very difficult to install with pip.


To run the test suite after installing regionmask, install pytest and run pytest in the root directory of regionmask.

To install the development version (master), do:

pip install git+