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.6 | Python 3.7 | Python 3.8 | Python 3.9 |
---|---|---|---|---|
Linux | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
Windows | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
OsX | [CPU] | [CPU] | [CPU] | [CPU] |
To prevent version conflicts, we recommend installing scikit-learn-intelex
into a new conda environment.
-
Install into a newly created environment (recommended):
conda create -n env -c conda-forge python=3.9 scikit-learn-intelex
If you do not specify the version of Python (
python=3.9
in the example above), then Python 3.10 is downloaded by default, which is not supported. -
Install into your current environment:
conda install scikit-learn-intelex -c conda-forge
OS / Python version | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 |
---|---|---|---|---|
Linux | [CPU] | [CPU] | [CPU] | [CPU] |
Windows | [CPU] | [CPU] | [CPU] | [CPU] |
MacOS | [CPU] | [CPU] | [CPU] | [CPU] |
We recommend this installation for the users of Intel® Distribution for Python.
-
Install into a newly created environment (recommended):
conda create -n env -c intel python scikit-learn-intelex
-
Install into your current environment:
conda install scikit-learn-intelex -c intel
OS / Python version | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 |
---|---|---|---|---|
Linux | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
Windows | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
MacOS | [CPU] | [CPU] | [CPU] | [CPU] |
-
Install into a newly created environment (recommended):
conda create -n env python=3.9 scikit-learn-intelex
If you do not specify the version of Python (
python=3.9
in the example above), then Python 3.10 is downloaded by default, which is not supported. -
Install into your current environment:
conda install scikit-learn-intelex
OS / Python version | Python 3.6 | Python 3.7 | Python 3.8 | Python 3.9 |
---|---|---|---|---|
Linux | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
Windows | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] | [CPU, GPU] |
MacOS | [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.6, < 3.10
- daal4py >= 2021.4
NOTE: You can build daal4py from sources or get it from distribution channels.
- SKLEARNEX_VERSION: sets package version
-
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
.