Python library installation

Note. Installation is only supported by the 64-bit version of Python.
To install the Python package:
  1. Choose an installation method.

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

  3. (Optionally) Test CatBoost

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

Installation method

Run the following command:

pip install catboost

Only CUDA 8.0 is officially supported in compiled Python packages. CUDA Toolkit must be installed. Build the binary from source if GPU support is required and the installed version of CUDA differs from 8.0. CatBoost should work fine with CUDA 8.0 and later versions.

Additional packages for data visualization support

Execute the following steps to support the data visualization feature in Jupyter Notebook:
  1. Install the ipywidgets Python package (version 7.x or higher is required):

    pip install ipywidgets
    The visualization of previously created documents does not work after updating to ipywidgets 7.x. Perform the following steps to make the old contents work:
    1. Create a new Jupyter document. The file name must differ from the old one.
    2. Paste the contents of the old file to the new one.
    3. (Optionally) Refresh the notebook page and restart the kernel if the visualization does not work.
  2. Turn on the widgets extension:

    jupyter nbextension enable --py widgetsnbextension

Test CatBoost

Use the following example to test CatBoost:

import numpy 
from catboost import CatBoostRegressor

dataset = numpy.array([[1,4,5,6],[4,5,6,7],[30,40,50,60],[20,15,85,60]])
train_labels = [1.2,3.4,9.5,24.5]
model = CatBoostRegressor(learning_rate=1, depth=6, loss_function='RMSE')
fit_model =, train_labels)

print fit_model.get_params()

GPU system requirements

Devices of compute capability 3.0 and higher are supported in compiled packages.

The Python version of CatBoost for CUDA of compute capability 2.0 can be built from source. In this case step 4 of the sequence is obligatory.