Skip to content

Installation

Prerequisites

  • Python ≥ 3.12
  • pip or conda

pip

Install the core package:

bash
pip install sklearn-genetic-opt

Install all optional extras (plotting, MLflow, TensorBoard):

bash
pip install sklearn-genetic-opt[all]

Install individual extras:

bash
pip install sklearn-genetic-opt[plot]      # seaborn for plot_fitness_evolution / plot_search_space
pip install sklearn-genetic-opt[mlflow]    # MLflow 3 logging

conda

bash
conda install -c conda-forge sklearn-genetic-opt

The conda package ships only the core dependencies. Install optional extras alongside it:

bash
conda install -c conda-forge sklearn-genetic-opt seaborn mlflow

Requirements

PackageMinimum versionRequired
Python3.12Yes
scikit-learn1.5.0Yes
NumPy1.26.0Yes
pandas1.3.0Yes
DEAP1.4.0Yes
tqdm4.60.0Yes
Seaborn0.13.2No (plots)
MLflow3.14.0No (MLflow logging)
TensorFlow2.21.0No (TensorBoard logging, Python < 3.14)
TensorBoard2.20.0No (TensorBoard logging)

Verify the installation

python
import sklearn_genetic
print(sklearn_genetic.__version__)

Next Steps

  • Basic Usage — start here if you're new to the library.
  • When to Use — decide if GA search fits your problem.

Released under the MIT License.