Installation

These instructions assume you are working from a local checkout of the Abacus repository.

Prerequisites

Item Notes
Python The package requires Python 3.11 or later. The repo development environment uses Python 3.12.
Local checkout Install from the repository root, not from a published package index.
Writable temp/cache directory Useful for PyTensor compiledir and local verification commands.

This is the supported local development path for the repository.

conda env create -f environment.yml
conda activate abacus-dev
python3 -m pip install -e .

This gives you:

  • the repo-managed development environment from environment.yml
  • an editable install, so local code changes are picked up immediately

Minimal pip install from source

If you do not want the full Conda environment, you can still install Abacus directly from the repository root.

Standard install

python3 -m pip install .

Editable install

python3 -m pip install -e .

Use the editable install if you are changing code, configs, or docs locally.

Optional extras

Abacus defines a small set of optional extras in pyproject.toml.

Extra Install command Use when you need
lint python3 -m pip install .[lint] Ruff, MyPy, and related local linting tools
test python3 -m pip install .[test] Pytest and test-only dependencies
planner python3 -m pip install -e ".[planner]" Dash and Plotly for the scenario planner surfaces

If you created the environment from environment.yml, most development dependencies are already present.

Verify the install

A quick smoke check from the repository root:

python3 -c "from abacus.mmm.panel import PanelMMM; print(PanelMMM.__name__)"

For a real end-to-end verification path, use the repo smoke target:

make smoke_mmm

If you are working on the repo itself, the main local verification commands are:

make test
make verify_local
make verify_package

Runtime defaults for restricted environments

Some local runs need writable cache directories. If you hit PyTensor compiledir or cache-permission issues, export the same defaults used by the repo verification scripts:

export PYTENSOR_FLAGS="base_compiledir=/tmp/pytensor,linker=py"
export JAX_PLATFORMS=cpu
export XDG_CACHE_HOME=/tmp

Next steps