Python package installation

Note

CatBoost Python package supports only CPython Python implementation.

Alert

Installation is only supported by the 64-bit version of Python.

Dependencies:

  • graphviz (if you want to use plot_tree function)
  • matplotlib
  • numpy (>=1.16.0)
  • pandas (>=0.24)
  • plotly
  • scipy
  • six

Note

Note that in most cases dependencies will be installed automatically using mechanisms built into setuptools, pip or conda.

To install the Python package:

  1. Choose an installation method:

  2. (Optionally) Install additional packages for data visualization support.

  3. (Optionally) Additional setup if user-defined functions are used:

    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.

  4. (Optionally) Test CatBoost.

Note that there are additional system requirements if training on GPU is required.

GPU system requirements

The versions of CatBoost for Linux and Windows available from pip install and conda install have CUDA-enabled GPU support out-of-the-box.

As of CatBoost 1.2.8, devices with CUDA compute capability >= 3.5 are supported in released packages.

All necessary CUDA libraries are statically linked in the released Linux and Windows binaries, the only installation necessary is the appropriate version of the CUDA driver.

Training or inference on CUDA-enabled GPUs requires NVIDIA Driver of version 450.80.02 or higher.