Installation

Prerequisites

meridian-tools requires Python 3.11 or later and a working installation of Google Meridian with schema support.

Install Meridian first

Meridian is the upstream modelling engine. Install it before meridian-tools:

pip install "google-meridian[schema]==1.5.3"

If you are working from a local Meridian checkout:

pip install -e "/path/to/meridian[schema]"

Verify the install:

from meridian import version
print(version.__version__)

Install meridian-tools

cd /path/to/meridian-tools
pip install -e ".[dev]"

The [dev] extra installs pytest, ruff, and mypy for running the test suite and linter.

Editable install without dev extras

pip install -e .

Verify the install

meridian-tools --help

You should see the CLI help output listing the run and demo subcommands. This command is deliberately lightweight — it does not import TensorFlow, NumPy, or Meridian.

You can also verify in Python:

import meridian_tools
print(meridian_tools.__version__)

Runtime dependencies

The following are declared in pyproject.toml and installed automatically:

Package Version bound
google-meridian[schema] ==1.5.3
arviz >=0.18.0, <0.20.0
pandas >=2.2.0, <3
pydantic >=2.8.0, <3
PyYAML >=6.0.0, <7
vl-convert-python >=1.7.0, <2

TensorFlow is not a direct dependency of meridian-tools. It comes transitively through google-meridian.

Development extras

pip install -e ".[dev]"

This adds:

Package Purpose
pytest Test runner
ruff Linter and formatter

Troubleshooting

If meridian-tools --help fails with an import error, check that:

  1. You are in the correct virtual environment.
  2. Meridian is installed with the [schema] extra.
  3. Python version is 3.11 or later: python --version.

If pip install -e . fails, ensure setuptools>=68.0.0 is available:

pip install --upgrade setuptools

See the troubleshooting guide for more common issues.