Python

Pip

QOCO is on PyPI and can be installed as follows. If on Windows, MSVC must be installed on your system.

pip install qoco

CUDA Backend

To install QOCO with GPU acceleration via the CUDA backend, install the separate qoco-cuda package using the extras specifier:

pip install qoco[cuda]

This installs qoco-cuda alongside qoco and enables the algebra="cuda" option when constructing a solver.

Runtime requirements: The CUDA backend loads its GPU libraries dynamically at runtime. Before using it, ensure the following are installed on your system:

  • CUDA Toolkit 13 — provides the GPU runtime and compiler.

  • cuDSS — NVIDIA’s GPU-accelerated sparse direct solver library, used internally by QOCO for KKT factorization. Download it from the NVIDIA developer website and follow the installation instructions provided there.

After installing, verify the backend is available:

import qoco
qoco.algebra_available("cuda")  # should return True

Build from Source

The Python wrapper for QOCO can also be built from source as follows.

git clone https://github.com/qoco-org/qoco-python
cd qoco-python
pip install .

CUDA Backend from Source

To build the CUDA backend from source, build the qoco-cuda sub-package instead:

git clone https://github.com/qoco-org/qoco-python
cd qoco-python/backend/cuda
pip install .

This requires the CUDA Toolkit to be installed and the nvcc compiler to be on your PATH.