Skip to content

Latest commit

 

History

History
executable file
·
202 lines (141 loc) · 6.98 KB

INSTALL.md

File metadata and controls

executable file
·
202 lines (141 loc) · 6.98 KB

Installation

To install Intel(R) Extension for Scikit-learn*, use one of the following scenarios:

NOTE: Intel(R) Extension for Scikit-learn* is also available as a part of Intel® AI Tools. If you already have it installed, you do not need to separately install the extension.

Before You Begin

Check System and Memory Requirements.

Supported Configurations

OS / Python version Python 3.8 Python 3.9 Python 3.10 Python 3.11 Python 3.12
Linux [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU]
Windows [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU] [CPU, GPU]

Applicable for:

  • PyPI
  • Anaconda Cloud from Conda-Forge Channel
  • Anaconda Cloud from Intel Channel
  • Anaconda Cloud from Main Channel

Install via PIP

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 from PyPI Channel (recommended by default)

Install scikit-learn-intelex:

pip install scikit-learn-intelex

Install from Anaconda Cloud

To prevent version conflicts, we recommend to create and activate a new environment.

Install via Anaconda Cloud from Conda-Forge Channel

  • 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 Python version, 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

Install via Anaconda Cloud from Intel Channel

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 Python version, 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

Install via Anaconda Cloud from Main Channel

NOTE: You may not find the latest version on the Anaconda Main channel since it usually lags on versions deployed.

  • 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

Build from Sources

Intel(R) Extension for Scikit-learn* is easily built from the sources with the majority of the necessary prerequisites available with conda or pip.

The package is available for Windows* OS, Linux* OS, and macOS*.

Prerequisites

  • Python version >= 3.8, <= 3.12
  • daal4py >= 2024.3

TIP: Build daal4py from sources or get it from distribution channels.

Configure the Build with Environment Variables

  • SKLEARNEX_VERSION: sets the package version
  • DALROOT: sets the oneAPI Data Analytics Library path

Build Intel(R) 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_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

Where:

  • Keys --single-version-externally-managed and --no-deps are required to not download daal4py after the installation of Intel(R) Extension for Scikit-learn.
  • The develop mode does not install the package but creates 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 reinstalling the package after a small change.
  • --single-version-externally-managed is an option for Python packages instructing the setup tools module to create a package the host's package manager can easily manage.

Next Steps