Open-source project
scikit-learn/scikit-learn avatar
scikit-learn/scikit-learn

scikit-learn 1.9.0: A mature, dependency-heavy ML library that still sets the baseline for Python

scikit-learn: machine learning in Python

67,260 stars27,404 forksPythonBSD-3-Clause

At a glance

What is it?
scikit-learn 1.9.0 is the latest release of the long-running Python machine learning library. It solves the problem of providing a consistent, NumPy-based API for classic ML algorithms, but its growing dependency stack and focus on traditional methods make it a deliberate choice, not a default.
Who is it for?
Adopt scikit-learn if you need a stable, well-documented API for classical ML (regression, classification, clustering) and you already live in the NumPy/SciPy ecosystem. Do not adopt it if you need deep learning, GPU-native training, or a minimal dependency footprint, as the library now requires Python 3.11+, NumPy 1.24.1+, and the new Narwhals 2.0.1+ dependency.
Can I use it commercially?
Yes. BSD-3-Clause is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What scikit-learn actually solves and who it serves

scikit-learn is a Python module for machine learning built on top of SciPy. It is not a deep learning framework, nor a distributed computing platform. It solves the problem of offering a coherent, unified API for classical algorithms: linear models, support vector machines, tree-based methods, clustering, dimensionality reduction, and model evaluation. The target user is an engineer or data scientist who needs a reliable, well-tested toolkit for tabular data, where the emphasis is on reproducibility and consistency rather than raw speed or novel architectures. The project began in 2007 as a Google Summer of Code project, and its longevity is visible in the release cadence: 1.7.2, 1.8.0, and now 1.9.0 within a year. This is a library for people who want to ship models that are easy to explain and easy to swap in and out.

The mechanism: NumPy arrays and a consistent fit/predict contract

The core design is that every estimator follows a fit and predict pattern. Input data is expected to be a NumPy array or a sparse matrix, and the library handles the rest through a thin layer on top of SciPy. The README states that scikit-learn requires NumPy, SciPy, Narwhals, joblib, and threadpoolctl. The new addition is Narwhals, a dataframe interoperability layer, which suggests that the library is moving toward accepting pandas and other dataframe types more uniformly. The actual data flow is straightforward: you call fit on a training set, then predict on new data. The library also includes utilities for preprocessing, model selection, and metrics, all following the same estimator interface. This consistency is the main reason scikit-learn remains relevant: once you learn one estimator, you can apply that knowledge to dozens of others. The trade-off is that the library does not manage GPU memory or distributed execution; it assumes your data fits in RAM and that you are comfortable with CPU-bound training for most algorithms.

Installation and setup: what the README actually tells you

The README gives two official installation routes. With pip, the command is pip install -U scikit-learn. With conda, it is conda install -c conda-forge scikit-learn. The README advises that you should already have a working installation of NumPy and SciPy, but the package will pull in the required dependencies automatically. The minimum versions are explicit: Python 3.11 or newer, NumPy 1.24.1 or newer, SciPy 1.10.0 or newer, Narwhals 2.0.1 or newer, joblib 1.4.0 or newer, and threadpoolctl 3.5.0 or newer. If you want to run the examples or use the plotting functions, you also need Matplotlib 3.6.1 or newer. A few examples require scikit-image, pandas, seaborn, or Plotly, but those are not core dependencies. For a quick start, pip install is sufficient. The README does not mention any build-from-source steps, so the assumption is that wheels are available for most platforms.

Testing and reproducibility: the SKLEARN_SEED mechanism

The README includes a testing section that is unusually specific. After installation, you can run the test suite from outside the source directory with pytest sklearn, provided you have pytest 7.1.2 or newer. What stands out is the SKLEARN_SEED environment variable, which controls random number generation during testing. This is a concrete mechanism for reproducibility: you can set a fixed seed and get deterministic test results. The documentation link points to a global configuration page, which suggests that scikit-learn has a broader configuration system beyond just testing. For an engineer evaluating the library, this is a practical detail. It means you can verify that your installation is correct and that your model training is reproducible, at least to the extent that the library controls randomness. The existence of this variable also hints at the library's maturity: it has thought about the nondeterminism that plagues many ML projects.

The new Narwhals dependency: a double-edged sword

The most notable change in the dependency list is the addition of Narwhals, with a minimum version of 2.0.1. Narwhals is a dataframe interoperability library, and its inclusion means scikit-learn is no longer purely NumPy/SciPy. This is a significant shift. On the positive side, it likely allows scikit-learn to accept pandas, polars, and other dataframe types without converting them to NumPy arrays first, which could reduce memory overhead and improve integration with modern data workflows. On the negative side, it adds a new dependency that must be maintained and versioned. For a library that has historically been lean, this is a trade-off. The README does not explain what Narwhals is used for, so the actual behavior is unclear. This is a case where the documentation is thin, and an engineer should verify whether the Narwhals integration affects their existing pipelines. If you are using only NumPy arrays, the new dependency might be unnecessary overhead. If you are using polars, it could be a welcome addition.

A real limitation: not the tool for deep learning or GPU work

The README makes no mention of GPU support, deep learning layers, or automatic differentiation. This is not an omission; it is a design boundary. scikit-learn is built on SciPy, which is CPU-oriented. If your problem requires training large neural networks or leveraging GPU acceleration, scikit-learn is the wrong tool. You would be better served by a dedicated deep learning framework, which typically has its own tensor API and GPU kernels. Even for classical algorithms, scikit-learn's performance is limited by the single-machine, in-memory assumption. The README does not discuss distributed training or out-of-core computation. For datasets that do not fit in RAM, you would need to chunk your data or use a different library. This limitation is not a flaw; it is a scope definition. But it means that engineers evaluating scikit-learn for a modern ML pipeline must be clear about their constraints.

The alternative: PyTorch or TensorFlow for a different approach

If you need deep learning, the natural alternative is PyTorch or TensorFlow. The difference in approach is fundamental. scikit-learn gives you a fixed set of algorithms with a uniform API, where you configure hyperparameters and call fit. PyTorch gives you a tensor library and a neural network module, where you define the model architecture, the loss function, and the training loop yourself. PyTorch is more flexible and can handle GPU training, but it requires more code and more manual management of the training process. scikit-learn is more opinionated and easier to use for standard tabular problems. The alternative is not a drop-in replacement; it is a different paradigm. For an engineer who only needs logistic regression or a random forest, PyTorch is overkill. For a team building a custom neural network, scikit-learn will not help. The choice depends on whether you want a toolbox or a framework.

Maintenance and upgrade cost: what the version history signals

The release history shows a steady cadence: 1.7.2 in September 2025, 1.8.0 in December 2025, and 1.9.0 in June 2026. This indicates active maintenance and a predictable upgrade path. The library is not archived, and the default branch is main, which is typical for an actively developed project. The license is BSD-3-Clause, which is permissive and allows commercial use without copyleft obligations. The README mentions that the project is maintained by a community of contributors with institutional support, which is a sign of sustainability but not a guarantee. The upgrade cost is moderate: because the library has a stable API, most code written for 1.7 or 1.8 should work with 1.9, but the new Narwhals dependency could introduce subtle changes in dataframe handling. The README does not provide a migration guide, so you should check the changelog before upgrading. The testing mechanism with SKLEARN_SEED can help you verify that your models still produce the same results after an upgrade.

Editorial conclusion

Adopt scikit-learn if you need a stable, well-documented API for classical ML (regression, classification, clustering) and you already live in the NumPy/SciPy ecosystem. Do not adopt it if you need deep learning, GPU-native training, or a minimal dependency footprint, as the library now requires Python 3.11+, NumPy 1.24.1+, and the new Narwhals 2.0.1+ dependency. Before committing, verify that your deployment environment can meet these minimum versions and that your use case does not require the newer Narwhals-based dataframe interoperability, which is still evolving.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Community notes

Community notes