Intel(R) Extension for Scikit-learn is available at the Python Package Index, on Anaconda Cloud in Conda-Forge channel and in Intel channel. You can also build the extension from sources.
The extension is also available as a part of Intel® AI Analytics Toolkit (AI Kit). If you already have AI Kit installed, you do not need to separately install the extension.
- Install via pip or conda
- Build from sources
- Build documentation for Intel(R) Extension for Scikit-learn
Next steps after installation:
-
[Optional step] [Recommended] To prevent version conflicts, create and activate a new environment:
-
On Linux:
python -m venv env source env/bin/activate
-
On Windows:
python -m venv env .\env\Scripts\activate
-
-
Install
scikit-learn-intelex
:pip install scikit-learn-intelex
OS / Python version | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 |
---|---|---|---|---|
Linux | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
Windows | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
To prevent version conflicts, we recommend installing scikit-learn-intelex
into a new conda environment.
-
Install into a newly created environment (recommended):
conda config --add channels conda-forge conda config --set channel_priority strict conda create -n env python=3.10 scikit-learn-intelex
..note: If you do not specify the version of Python, the latest one is downloaded.
-
Install into your current environment:
conda config --add channels conda-forge conda config --set channel_priority strict conda install scikit-learn-intelex
OS / Python version | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 |
---|---|---|---|---|
Linux | [CPU] | [CPU] | [CPU] | [CPU] |
Windows | [CPU] | [CPU] | [CPU] | [CPU] |
We recommend this installation for the users of Intel® Distribution for Python.
-
Install into a newly created environment (recommended):
conda config --add channels intel conda config --set channel_priority strict conda create -n env python=3.10 scikit-learn-intelex
..note: If you do not specify the version of Python, the latest one is downloaded.
-
Install into your current environment:
conda config --add channels intel conda config --set channel_priority strict conda install scikit-learn-intelex
OS / Python version | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 |
---|---|---|---|---|
Linux | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
Windows | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
NOTE: Anaconda Main channel usually lags behind on versions deployed. You likely will not find latest version there.
-
Install into a newly created environment (recommended):
conda create -n env python=3.10 scikit-learn-intelex
..note: If you do not specify the version of Python, the latest one is downloaded.
-
Install into your current environment:
conda install scikit-learn-intelex
OS / Python version | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 |
---|---|---|---|---|
Linux | [CPU] | [CPU] | [CPU] | [CPU] |
Windows | [CPU] | [CPU] | [CPU] | [CPU] |
Intel(R) Extension for Scikit-learn is easily built from sources with the majority of the necessary prerequisites available on conda or pip. The instructions below detail how to gather the prerequisites and build and install the completed package. The package can be built for all three major platforms (Windows, Linux, macOS).
- Python version >= 3.8, <= 3.11
- daal4py >= 2024.0
NOTE: You can build daal4py from sources or get it from distribution channels.
- SKLEARNEX_VERSION: sets package version
- DALROOT: sets the oneAPI Data Analytics Library path
-
To install the package:
cd <checkout-dir> python setup_sklearnex.py install
-
To install the package in the development mode:
cd <checkout-dir> python setup_sklearnex.py develop
-
To install scikit-learn-intelex without downloading daal4py:
cd <checkout-dir> python setup_sklearnex.py install --single-version-externally-managed --record=record.txt
cd <checkout-dir> python setup_sklearnex.py develop --no-deps
--single-version-externally-managed
and --no-deps
are required so that daal4py is not downloaded after installation of Intel(R) Extension for Scikit-learn
develop
mode will not install the package but it will create a .egg-link
in the deployment directory
back to the project source code directory. That way you can edit the source code and see the changes
without having to reinstall package every time you make a small change.
--single-version-externally-managed
is an option used for Python packages instructing the setuptools module
to create a Python package that can be easily managed by the package manager on the host.
Run:
cd doc
./build-doc.sh
The documentation will be in doc/_build/html
.