Installation

Conda

conda install -c scipopt -c conda-forge ecole

PyScipOpt is not required but is the main SCIP interface to develop new Ecole components from Python

conda install -c scipopt -c conda-forge ecole pyscipopt

Currenlty, conda packages are only available for Linux and MacOS.

Pip

We plan to deploy builds on PyPI.

From Source

Build dependencies

Conda

All dependencies required for building Ecole can be resolved using a conda environment. Install everything in a development (named ecole) environment using

conda env create -n ecole -f conda-dev.yml

For the following, the ecole environment always needs to be activated.

conda activate ecole
conda config --append channels conda-forge
conda config --set channel_priority flexible

Note: this environment contains tools to build ecole and scip, format code, test, generate documentation etc. These are more than the dependencies to only use Ecole.

CMake

CMake is a meta-build tool, used for configuring other build tools (e.g. Make) or IDE’s. The whole build of Ecole can be done with CMake. A one-time configuration is necessary for CMake to find dependencies, detect system information, etc. Using cmake, we recommend building out of source using cmake -B build/ to configure, and cmake --build build/ to compile. CMake is made available in the ecole environment created earlier.

SCIP runtime dependency

Scip dependency is resolved from conda inside dev/conda.yaml. No other action are necessary :)

Building

In the Ecole source repository, configure using

cmake -B build/ -D ECOLE_DEVELOPER=ON

Note: this is the time to pass optional build options, such as the build type and compiler choice. For instance ``-D CMAKE_BUILD_TYPE=Debug`` can be added to compile with debug information.

The definition -D ECOLE_DEVELOPER=ON changes the default settings (such as the build type, static analysis, etc.) for added convenience and to ensure high quality contributions. Only the default settings are changed, this mode does not override any explicit setting.

Then, build Ecole with

cmake --build build/

The Python package can finally be installed from the build directory

python -m pip install -I build/python

Compiler issues

If you encounter problem with your compiler (because it is too old for instance), you can use the ones from ananconda.

conda install gxx_linux-64  # Linux

And start again the configuring of Ecole.

rm -r build/ && cmake -B build/ -D ECOLE_DEVELOPER=ON