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 catbooston a new Python/musl.Failed building wheel for catboostwith CMake/C++ errors.ReadTimeoutErrorpulling 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.
# 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.
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-catboost-${{ hashFiles('requirements*.txt') }}Common errors
| Error | Cause | Fix |
|---|---|---|
| Could not find a version that satisfies catboost | No wheel for Python/musl | Pin a supported Python; use glibc |
| Failed building wheel for catboost | CMake/C++ source build | Force --only-binary |
| ReadTimeoutError pulling wheel | Large download timed out | Raise --timeout; cache pip |
| Exit 137 during training | OOM-killed | Bigger 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).