Installation

Basic Installation

Install from PyPI (Python 3.10 or later):

pip install cng-datasets

Or install from source:

git clone https://github.com/boettiger-lab/datasets.git
cd datasets
pip install -e .

Development Installation

To install with development tools:

pip install -e ".[dev]"

This includes:

  • pytest, ruff, black and mypy

Raster Processing Support

The [raster] extra adds exactextract and rasterio but deliberately leaves out the GDAL Python bindings, which must match the system’s libgdal exactly. Install GDAL from your system package manager first:

Ubuntu/Debian

sudo apt-get install gdal-bin libgdal-dev python3-gdal
pip install -e ".[raster]"

macOS

brew install gdal
pip install -e ".[raster]"

Verifying Installation

Check that the package is installed correctly:

cng-datasets --help

You should see the command-line interface help message.