qpsolvers
Quadratic programming solvers in Python with a unified API.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, no known vulnerabilities, and solves a well-defined numerical problem with a clean API. The copyleft license requires attention if you plan to distribute derivative works, but the library itself and its optional backends cover both open-source and commercial use cases. Install it if you need to solve convex quadratic programs or want to experiment with multiple QP solvers.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Matrix P must be positive semi-definite (convex); some solvers require positive definite (strictly convex).
- Low friction install with only numpy and scipy as runtime dependencies.
License · maintenance · safety
copyleft license (copyleft) — Licensed under LGPLv3 (copyleft). Derivative works must be distributed under compatible terms; proprietary use requires careful review or use of optional commercial solver backends.
last release 2026-07-19 (26 days) · last repo commit 2026-07-23 · 756 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 831,731 downloads/mo, #4,943 on PyPI
Alternatives
Verify before relying
import numpy as np
from qpsolvers import solve_qp
P = np.array([[4.0, 1.0], [1.0, 3.0]])
q = np.array([1.0, 1.0])
G = np.array([[1.0, 1.0], [1.0, -1.0]])
h = np.array([1.0, 1.0])
x = solve_qp(P, q, G, h, solver="proxqp")
print(x)- Whether all backend solvers are automatically installed or require separate installation steps
- Performance characteristics and solver selection guidance for specific problem classes
- Support for non-convex quadratic programs or workarounds
What it is and what it does
qpsolvers is a wrapper library that provides a single `solve_qp` function to solve convex quadratic programs with multiple backend solvers. It abstracts away the differences between solvers like OSQP, ProxQP, Clarabel, and others, allowing you to write solver-agnostic code and switch backends by changing a keyword argument. The library accepts problem matrices as NumPy arrays (for dense solvers) or SciPy CSC sparse matrices (for sparse solvers), and returns the optimal solution vector or None if the problem is infeasible.
The package also offers a `solve_problem` function that returns not just the primal solution but also dual multipliers and other solver-computed quantities. It supports standard QP form with linear inequality constraints (Gx ≤ h), equality constraints (Ax = b), and variable bounds (lb ≤ x ≤ ub). The library automatically detects which solvers are available on your system and lists them in `qpsolvers.available_solvers`, letting you choose based on your problem structure and performance needs.
Use it for
- Solve constrained least-squares problems by converting them to QP form with appropriate P and q matrices.
- Implement model predictive control or trajectory optimization in robotics by solving QPs at each time step.
- Benchmark multiple QP solvers on the same problem to find the fastest or most accurate for your use case.
- Add penalty terms (ridge regression, LASSO-like regularization) by incorporating them into the QP objective.
- Extract dual multipliers and sensitivity information for post-solution analysis or warm-starting.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, no known vulnerabilities, and solves a well-defined numerical problem with a clean API. The copyleft license requires attention if you plan to distribute derivative works, but the library itself and its optional backends cover both open-source and commercial use cases. Install it if you need to solve convex quadratic programs or want to experiment with multiple QP solvers.
Install
qpsolvers on PyPI
Before you install
Low friction install with only numpy and scipy as runtime dependencies. Active maintenance with a recent release (26 days old) and steady repository activity.
Requires Python 3.10 or later. Matrix P must be positive semi-definite (convex); some solvers require positive definite (strictly convex).
License in practice
Licensed under LGPLv3 (copyleft). Derivative works must be distributed under compatible terms; proprietary use requires careful review or use of optional commercial solver backends.
Quickstart
import numpy as np
from qpsolvers import solve_qp
P = np.array([[4.0, 1.0], [1.0, 3.0]])
q = np.array([1.0, 1.0])
G = np.array([[1.0, 1.0], [1.0, -1.0]])
h = np.array([1.0, 1.0])
x = solve_qp(P, q, G, h, solver="proxqp")
print(x)
Verify before relying
- Whether all backend solvers are automatically installed or require separate installation steps
- Performance characteristics and solver selection guidance for specific problem classes
- Support for non-convex quadratic programs or workarounds
Package facts
| License | copyleft license copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesnumpyscipy |
| Maintenance | Actively maintained 26 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 831,731 / month, #4,943 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Operating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Mathematics |
Evidence: qpsolvers-4.13.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “solve_qp function”
- qpsolversProvides a unified Python interface to solve convex quadratic…
- unitycatalog-aiProvides Python APIs to create, retrieve, and execute Unity Catalog…
- patchyPatchy modifies Python functions at runtime by replacing their code…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also daqp · highspy · osqp · proxsuite · quadprog · cvxopt · cvxpy · cvxpy-base · Mosek · ecos