Installation

Intel® Extension for Scikit-learn* is available at the Python Package Index, on Anaconda Cloud in Conda-Forge channel and in Intel channel.

Intel® Extension for Scikit-learn* is also available as a part of Intel oneAPI AI Analytics Toolkit (AI Kit). If you already have AI Kit installed, you do not need to separately install the extension.

You can also build the extension from sources.

See also

Check out System requirements and supported configurations before you start the installation process.

Install from distribution channels

Install from Anaconda Cloud

To prevent version conflicts, we recommend installing scikit-learn-intelex into a new conda environment. For each distribution channel, there are two installation options: with and without a creation of a new environment.

  • Install from Anaconda Cloud: Conda-Forge channel (recommended by default for conda users):

    • into a newly created environment (recommended):

      conda create -n env -c conda-forge python=3.9 scikit-learn-intelex
      

      Important

      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.

      See supported configurations for Conda-Forge channel.

    • into your current environment:

      conda install scikit-learn-intelex -c conda-forge
      
  • Install from Anaconda Cloud: Intel channel (recommended for the users of Intel® Distribution for Python):

    • into a newly created environment (recommended):

      conda create -n env -c intel python scikit-learn-intelex
      

      Note that you may also specify the version of Python to download (see supported configurations for Anaconda Intel channel). For example:

      conda create -n env -c intel python=3.7 scikit-learn-intelex
      
    • into your current environment:

      conda install scikit-learn-intelex -c intel
      
  • Install from Anaconda Cloud: Main channel:

    • into a newly created environment (recommended):

      conda create -n env python=3.9 scikit-learn-intelex
      

      Important

      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.

      See supported configurations for Anaconda main channel.

    • into your current environment:

      conda install scikit-learn-intelex
      

Build from Sources

Sources are available in Intel® Extension for Scikit-learn* repository.

Prerequisites

Python version >= 3.6, < 3.10

Configure the build with environment variables

SKLEARNEX_VERSION: sets package version

Build Intel® Extension for Scikit-learn*

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.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

To install scikit-learn-intelex without downloading daal4py in the development mode:

cd <checkout-dir>
python setup_sklearnex.py develop --no-deps

Note

The 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 the package every time you make a small change.

⚠️ Keys --single-version-externally-managed and --no-deps are required so that daal4py is not downloaded after installation of Intel® Extension for Scikit-learn*

Note

--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