Skip to content

Installation

Terminal window
python -m pip install mapcv

mapcv needs Python 3.10 or newer (3.10 – 3.14 are tested). One pre-built wheel per platform covers every supported Python version:

Platform Wheel
Linux x86-64 and aarch64 (glibc, e.g. Ubuntu, Debian, Docker on Apple Silicon) yes
Linux x86-64 and aarch64 (musl, e.g. Alpine) yes
macOS (Intel and Apple Silicon) yes
Windows x86-64 yes
Other (for example Windows on ARM) builds from the source distribution; needs a Rust toolchain

The base install is small: Pillow, NumPy, Shapely, Pydantic, Typer, Rich, PyYAML, pyproj (its wheel bundles PROJ, so there is nothing else to install) and pyshp (a pure-Python Shapefile reader, so Shapefile labels work out of the box; GeoPackage needs only the standard library). Nothing needs a system library. XYZ tiles, GeoTIFF/COG files (local, https:// or public s3://) and Sentinel-2 COGs from a STAC catalog (type: stac_cog) work with the base install alone. Sentinel-2 EOPF Zarr products, Google Earth Engine, GeoParquet labels and some export formats need an extra.

Extra Install Adds Python
zarr pip install "mapcv[zarr]" Sentinel-2 L2A EOPF Zarr input: xarray-eopf, xarray, Dask, zarr 2, numba (≥ 0.68), s3fs, pystac-client. It is large: about 76 packages, 180 MB to download and 560 MB installed (Python 3.13), so uv pip install is much faster than pip. 3.10 – 3.13
parquet pip install "mapcv[parquet]" GeoParquet label files (.parquet, .geoparquet): pyarrow 3.10 – 3.14
export pip install "mapcv[export]" Every mapcv export format and reading a Zarr export with MapcvDataset: pyarrow for hf-parquet (Hugging Face Parquet) and zarr 2 for zarr (7 packages and about 200 MB installed, most of it pyarrow). webdataset and terratorch need nothing extra 3.10 – 3.14 (zarr 2 only up to 3.13)
gee pip install "mapcv[gee]" Google Earth Engine imagery (imagery.earth_engine): the earthengine-api client. Log in once with earthengine authenticate 3.10 – 3.14
mcp pip install "mapcv[mcp]" The MCP server for AI agents (mapcv mcp): the official MCP Python SDK and its dependencies. See Use mapcv with AI agents 3.10 – 3.14
Terminal window
$ mapcv --version
mapcv 0.3.1

mapcv --help (or mapcv -h) lists the commands, grouped in the order you use them: 1. Build a dataset (init, plan, generate), 2. Use a dataset (info, split, stats, card, verify, export) and 3. Utilities (validate, cache, mcp, doctor). If the shell says command not found, activate the environment you installed into (see Installed into a virtual environment? above), or run python -m pip show mapcv to see where it went.

mapcv’s CLI is built with Typer, which can install tab completion for bash, zsh, fish and PowerShell:

Terminal window
mapcv --install-completion # install for the current shell, then restart it
mapcv --show-completion # print the script, to install it yourself

Use this for development or on platforms without a wheel.

  1. Install Rust (stable) and Python 3.10+.

  2. Clone the repository:

    Terminal window
    git clone https://github.com/tahamukhtar20/mapcv
    cd mapcv
  3. Build and install into the active environment. --release turns on Rust optimisations; debug builds are much slower.

    Terminal window
    python -m pip install maturin
    maturin develop --release

    Contributors use uv sync --all-extras && uv run maturin develop instead; see Contributing.

Head to the Quickstart to build your first dataset.