Installation¶
Pip Install¶
PyEPO requires Python 3.9 or later. Install from PyPI with:
pip install pyepo
Conda Install¶
Install from Anaconda Cloud with:
conda install -c pyepo pyepo
Install from Source¶
Clone PyEPO from GitHub:
git clone -b main --depth 1 https://github.com/khalil-research/PyEPO.git
Install the package from the local checkout:
pip install ./PyEPO/pkg
Solvers¶
PyEPO compiles optimization models to a solver backend, so at least one solver must be installed. Each backend has a pip extra that installs its package alongside PyEPO:
Gurobi, the default backend. It is commercial, with a free academic license (
pip install pyepo[gurobi]).COPT, commercial with a free academic license (
pip install pyepo[copt]).Pyomo, which can use open solvers such as GLPK, CBC, or HiGHS without a commercial license (
pip install pyepo[pyomo]plus the solver binary).Google OR-Tools, open (
pip install pyepo[ortools]).MPAX, open and JAX-based, for GPU and batch solving (
pip install pyepo[mpax]).
The CaVE loss also needs Clarabel (pip install pyepo[cave]). To install every optional dependency at once, use pip install pyepo[all].
Note
A bare pip install pyepo does not install a solver backend. The default Gurobi backend needs pip install pyepo[gurobi] and a Gurobi license. For a license-free setup, use the Pyomo or OR-Tools backend.