clarabel
Clarabel Conic Interior Point Solver for Rust / Python
What it is and what it does
Clarabel is a Rust-based interior-point solver for convex optimization problems, exposed as a Python package. It solves conic programs—including linear programs, quadratic programs, second-order cone programs, and semidefinite programs—by reformulating them into a standard conic form and applying a homogeneous embedding technique. Unlike many interior-point solvers, it handles quadratic objectives directly without requiring reformulation, which can improve performance for problems with quadratic cost functions.
The package depends on numpy, scipy, and cffi for numerical operations and Python-Rust interoperability. It is actively maintained, supports current Python versions (3.9+), and provides prebuilt wheels for common architectures, reducing installation friction. The solver detects infeasible problems and supports a range of cone types including exponential and power cones, making it suitable for diverse optimization tasks in machine learning, control, finance, and engineering.
Use it for:
- Solve portfolio optimization and risk management problems with quadratic objectives and linear constraints
- Formulate and solve machine learning problems like support vector machines and robust regression as conic programs
- Detect infeasibility in constraint systems and provide certificates of infeasibility
- Solve control and robotics problems involving second-order cone constraints
- Benchmark and compare interior-point methods on semidefinite programming instances
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Clarabel is an interior-point conic optimization solver that handles linear programs, quadratic programs, second-order cone programs, semidefinite programs, and problems with exponential and power cone constraints.
Yes, if you need a robust, actively maintained conic optimizer with native Python bindings. The permissive Apache-2.0 license, zero known vulnerabilities, and support for modern Python versions make it a solid choice for convex optimization. Install friction is moderate due to compiled bindings, but prebuilt wheels cover common platforms. Not necessary if you already use a different solver or if your problems are outside the conic optimization scope.
Install
clarabel on PyPI
pip
pip install clarabeluv
uv add clarabelpoetry
poetry add clarabelInstalling clarabel
Before you install
Medium install friction due to compiled Rust bindings; prebuilt wheels available for common platforms (x86_64, ARM64 on Linux/macOS/Windows). Requires Python 3.9+. Active maintenance with recent commits and steady release cadence.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and redistribution with minimal restrictions; suitable for proprietary projects.
Quickstart
pip install clarabel
import clarabel
import numpy as np
# Define a simple quadratic program
P = np.eye(2)
q = np.array([1.0, 2.0])
A = np.array([[1.0, 1.0]])
b = np.array([1.0])
solver = clarabel.DefaultSolver(P, q, A, b)
result = solver.solve()
Requires Python 3.9 or later. Compiled Rust extension; if prebuilt wheels unavailable for your platform, installation requires a Rust toolchain.
Verify before relying
- Numerical stability and convergence guarantees for specific problem classes or scales
- Performance comparison with other interior-point solvers on standard benchmarks
- Memory requirements for large-scale semidefinite programs
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 3 — numpy, scipy, cffi |
| Maintenance | actively maintained — 429 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,039,053/month — #2,393 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: clarabel-0.11.1-cp39-abi3-macosx_10_12_x86_64.whl; clarabel-0.11.1-cp39-abi3-macosx_11_0_arm64.whl; clarabel-0.11.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; clarabel-0.11.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; clarabel-0.11.1-cp39-abi3-win_amd64.whl
Keywords: convex, optimization, conic, solver, linear-programming
Tags
More Mathematics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
kiwisolverkiwisolver is a Python binding to a fast C++…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
cvxoptcvxopt is a Python library for solving convex…
unclear · top 5,000 on PyPI
ecosECOS is a Python wrapper for a numerical solver…
copyleft · top 5,000 on PyPI
MosekMOSEK solves large-scale convex and…
unclear · top 15,000 on PyPI
scsscs is a Python interface to the Splitting…
permissive · top 5,000 on PyPI
cvxpyCVXPY is a Python modeling language for…
permissive · top 5,000 on PyPI
qpsolversProvides a unified Python interface to solve…
copyleft · top 5,000 on PyPI
quadprogSolves strictly convex quadratic programming…
copyleft · top 15,000 on PyPI
optlangOptlang formulates and solves linear,…
permissive · top 15,000 on PyPI
daqpDAQP is a dual active-set solver for convex…
permissive · top 15,000 on PyPI