Registry / data / scs
library3.2.11pypypi✓ verified 23d ago

SCS (Splitting Conic Solver) is a numerical optimization package for solving large-scale convex cone problems, including linear programs (LPs), second-order cone programs (SOCPs), and semidefinite programs (SDPs). It uses an operator-splitting method (ADMM) with Anderson acceleration for fast convergence. The current version is 3.2.11, with frequent patch releases.

pip install scs
INSTALL
IMPORT
SIG · SCS
S
scs
datapythonv3.2.11
Install
7.6s avg
Import
1022ms
Disk
268MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.2.11 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
1/3 runs
1/3 runs
py 3.11
✓ —
✓ 7.3s
py 3.12
✓ —
✓ 7.6s
py 3.13
✓ —
✓ 7.83s
py 3.9
1/3 runs
1/3 runs
268MB installed
● package 268MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SCS
from scs import SCS
import scs
solve
from scs import solve
import scs
SOLVED
from scs import SOLVED
import scs

This quickstart solves a simple convex cone program with a non-negative cone. It demonstrates how to prepare the problem data (sparse matrices P, A and dense vectors b, c), define the cone, initialize the SCS solver, and retrieve the solution.

import numpy as np import scipy.sparse as sp import scs # Define problem dimensions m, n = 4, 2 # Create problem data matrices (P, A as sparse CSC, b, c as numpy arrays) P = sp.eye(n, format="csc") # Quadratic cost (identity for simplicity) A = sp.random(m, n, density=0.5, format="csc", random_state=1) b = np.random.randn(m) c = np.random.randn(n) data = {"P": P, "A": A, "b": b, "c": c} # Define the cone: 'l' for non-negative cone of length m cone = {"l": m} # Initialize the SCS solver solver = scs.SCS(data, cone, verbose=False) # Solve the problem sol = solver.solve() print(f"Solver status: {sol['info']['status']}") if sol['info']['status'] == 'solved': print(f"Primal solution (x): {sol['x']}") print(f"Dual solution (y): {sol['y']}")
Debug
Known issues
gotchaInstalling SCS with optional backends (MKL, GPU) requires specific `pip install -Csetup-args` flags and pre-installed libraries (e.g., MKL, cuDSS, CUDA Toolkit). A standard `pip install scs` will use the default sparse direct solver (QDLDL), which may not be optimal for performance-critical applications.
fix
Consult the official documentation for detailed installation instructions for desired backends. Ensure all necessary system-level libraries are installed before attempting Python package installation.
affects: 3.x.x and earlier
gotchaProblem data `P` and `A` must be `scipy.sparse.csc_matrix`, and `b` and `c` must be `numpy.ndarray`. While SCS attempts conversion, providing data in the correct format directly avoids potential overhead or unexpected behavior.
fix
Always construct `P` and `A` as `scipy.sparse.csc_matrix` and `b`, `c` as 1D `numpy.ndarray` to ensure optimal performance and avoid implicit conversions.
affects: 3.x.x and earlier
gotchaSCS versions before 3.x have experienced compatibility issues with newer NumPy versions, sometimes failing installation or requiring specific NumPy versions to be pre-installed.
fix
For new projects, use SCS 3.x or higher, which has improved compatibility. If using older SCS versions, check for `numpy` version requirements in the specific release notes or issues.
affects: <3.0.0
gotchaWarm-starting solutions can significantly improve performance for solving sequences of similar problems, but incorrect use or stale warm-start data can lead to slower convergence or suboptimal results.
fix
Utilize the `warm_start` parameter in the `solve()` method when solving a series of problems where the current solution is a good approximation of the next. Pass the `sol` dictionary from a previous solve directly, or provide specific `x, y, s` arrays.
affects: All versions
Upgrade
Version history
3.2.11latest on PyPI · released Jan 9, 2026
Audit
Dependencies
numpyrequiredRequired for numerical arrays (b, c vectors).
scipyrequiredRequired for sparse matrices (P, A matrices, specifically CSC format).
mkloptionalOptional for MKL Pardiso direct solver backend.
cudssoptionalOptional for NVIDIA cuDSS GPU direct solver backend.
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources
scs — pip install scs · libregistry