Skip to content
Latchkey

How to Install CatBoost in CI Without Build Failures

CatBoost ships a large prebuilt wheel with its C++ engine bundled. CI pain is a missing wheel forcing an enormous source build, plus the wheel size and memory use.

CatBoost publishes manylinux wheels with its C++ gradient-boosting engine compiled in, so a correct install just downloads a (large) wheel. Being forced into a source build - by a too-new Python, musl, or an unusual arch - is a heavy CMake/C++ compile you almost never want in CI.

Why it fails in CI

A CatBoost source build is a large C++/CMake compile that slim and Alpine images are not set up for and that is very slow. The wheel is also big, so a slow download can time out, and model training can be memory-hungry on small runners.

  • Could not find a version that satisfies the requirement catboost on a new Python/musl.
  • Failed building wheel for catboost with CMake/C++ errors.
  • ReadTimeoutError pulling the large wheel; exit 137 OOM during training.

Install it reliably

Keep the wheel: glibc base image, a Python CatBoost ships wheels for, and force-binary. Raise the pip timeout for the large download.

Terminal
# Force the prebuilt wheel - C++ engine bundled
pip install --only-binary=:all: --timeout 120 catboost

# Pin a supported interpreter
- uses: actions/setup-python@v5
  with:
    python-version: '3.11'

Cache & speed

Cache ~/.cache/pip so the big wheel downloads once, and raise the pip timeout. For training jobs, prefer a right-sized runner over retrying OOM kills.

.github/workflows/ci.yml
- uses: actions/cache@v4
  with:
    path: ~/.cache/pip
    key: pip-catboost-${{ hashFiles('requirements*.txt') }}

Common errors

ErrorCauseFix
Could not find a version that satisfies catboostNo wheel for Python/muslPin a supported Python; use glibc
Failed building wheel for catboostCMake/C++ source buildForce --only-binary
ReadTimeoutError pulling wheelLarge download timed outRaise --timeout; cache pip
Exit 137 during trainingOOM-killedBigger runner

Key takeaways

  • CatBoost wheels bundle the C++ engine - never compile it in CI.
  • Glibc base + a supported Python + force --only-binary keeps you on the wheel.
  • Raise the pip timeout for the large wheel; watch memory (exit 137).

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →