Installation

SteinerPy is a pure-Python package published on PyPI. Install it with pip:

pip install steinerpy

or with uv:

uv add steinerpy

Requirements

  • Python 3.8+

  • NetworkX — graph representation

  • highspy — the HiGHS solver backend (installed automatically)

  • SciPy — installed automatically

Optional: the Gurobi backend

To use Gurobi as the solver you additionally need:

  • gurobipy: pip install gurobipy

  • A valid Gurobi license (free academic licenses are available from gurobi.com)

Gurobi is never required: the HiGHS backend is always available and produces the same optimal solutions. See Solver backends for a comparison of the two backends.