pip install

Note

CatBoost Python package supports only CPython Python implementation.

To install CatBoost from pip:

  1. Run the following command:

    pip install catboost
    

    Note

    PyPI contains precompiled wheels for most commonly used platform configurations:

    Operating system CPU architectures GPU support using CUDA
    macOS (versions currently supported by Apple) x86_64 and arm64 no
    Linux (compatible with manylinux2014 platform tag ) x86_64 and aarch64 yes
    Windows 10 and 11 x86_64 yes

    If the platform where the installation is performed is incompatible with platform tags of the available precompiled wheels then pip will try to build CatBoost python package from source. This approach requires certain build dependencies and requirements to be set up before the installation.

    Note

    Release native binaries for x86_64 CPU architectures are built with SIMD extensions SSE2, SSE3, SSSE3, SSE4 enabled. If you need to run CatBoost on older CPUs that do not support these instruction sets build CatBoost package from source

  2. Install visualization tools:

    1. Install the ipywidgets Python package (version 7.x or higher is required):

    pip install ipywidgets
    
    1. Turn on the widgets extension:

    jupyter nbextension enable --py widgetsnbextension
    

    Refer to the following sections for details:

  3. User-defined functions:

    If you want to use custom metrics or objectives implemented in your own python code you should install numba package to speed up the code execution using JIT compilation.

    If you want to use custom metrics or objectives on GPUs with CUDA support you must install numba package for JIT compilation of CUDA code.
    Installation of numba-cuda package is also encouraged.
    CUDA itself (not only drivers) must be installed on machines where this code is executed.
    See numba CUDA support documentation for more details.

    These packages are not listed in package requirements that are installed automatically because they are not needed for other functionality.