The simplest way to install the package on a recent Debian-based system with Python 3 is:

sudo apt install python3-dev
pip3 install qpsolvers

You can add the --user parameter for a user-only installation.

If you have an older system with Python 2, for instance Ubuntu 16.04, try:

sudo apt install python-dev
pip install -r requirements2.txt

Python 2 is not supported any more, but this may still work.


  • First, install the Visual C++ Build Tools

  • Install your Python environment, for instance Anaconda

  • Open a terminal configured for Python, for instance from the Anaconda Navigator, and run:

pip install qpsolvers


Open source solvers

To install at once all QP solvers available from the Python Package Index, run the pip command with the optional all_pypi_solvers dependency:

pip3 install "qpsolvers[all_pypi_solvers]"

This may take a while.


Gurobi comes with a one-line pip installation where you can fetch the solver directly from the company servers:

python -m pip install -i gurobipy

This version comes with limitations. For instance, trying to solve a problem with 200 optimization variables fails with the following warning:

Warning: Model too large for size-limited license; visit for a full license


Check out the official qpOASES installation page for the latest release. However, you might run into errors at the make python step. If so, you can check out qpOASES from this fork and follow these instructions:

git clone --recursive
cd qpOASES
cd interfaces/python
python install --user

The script takes the same command-line arguments as pip. Remove –user and run it as root to install the library system-wide.