Install
Requirements
EvoDAG needs Python 3.11 or newer and NumPy. Those are the only runtime dependencies; scikit-learn is optional (see Optional packages). Part of the library is written in Cython, so a compiled extension is shipped with it; the packaging files of the repository declare Python 3.11, 3.12, 3.13, 3.14 and 3.15 as the versions that are built and tested, on Linux, macOS and Windows.
From PyPI
pip install EvoDAGTo use the scikit-learn classes of EvoDAG (EvoDAGClassifier, EnsembleClassifier and their regression counterparts, see Python), install the sklearn extra, which adds scikit-learn 1.6 or newer:
pip install 'EvoDAG[sklearn]'When a prebuilt wheel exists for your platform and Python version, pip installs it and nothing is compiled. Otherwise pip downloads the source distribution and builds it, and then you need what is listed below under Building from source.
From conda-forge
conda config --add channels conda-forge
conda config --set channel_priority strict
conda install evodagor, with mamba:
mamba install evodagBuilding from source
Building the extensions requires a C compiler, Cython 3 or newer and NumPy 2 or newer. Those build requirements are declared in pyproject.toml, so a plain pip install of a checkout fetches Cython and NumPy by itself; the compiler is the only thing you must provide (gcc or clang on Linux and macOS, the Microsoft C++ build tools on Windows).
git clone https://github.com/mgraffg/EvoDAG.git
cd EvoDAG
pip install .For development, install in editable mode and rebuild the extensions after changing a .pyx file:
pip install -e ".[test]" # the test extra includes scikit-learn
python setup.py build_ext --inplace
python -m pytest -q testsCheck the installation
python -c "import EvoDAG; print(EvoDAG.__version__)"
EvoDAG-train --versionThe second command also confirms that the four console scripts (EvoDAG-params, EvoDAG-train, EvoDAG-predict and EvoDAG-utils) are on your PATH; they are described in the Command line page.
Optional packages
scikit-learn (pip install 'EvoDAG[sklearn]') enables the scikit-learn classes EvoDAGClassifier, EvoDAGRegressor, EnsembleClassifier and EnsembleRegressor. Without it import EvoDAG works and so do EvoDAGE, the engine and the command line; only from EvoDAG import EvoDAGClassifier (and the other three names) raises an ImportError that tells you what to install.
tqdm is used, when it is installed, to show a progress bar while an ensemble is trained or evaluated. Graphviz is only needed if you want to turn the graph that Model.graphviz writes into a picture (see Native API).