Python

The easiest way to install the python version is using pip:

pip install scs

You can also install directly from source

git clone --recursive https://github.com/bodono/scs-python.git
cd scs-python
python -m pip install .

MKL

If you have MKL, you can install the MKL Pardiso interface using

python -m pip install -Csetup-args=-Dlink_mkl=true .

See here for how to enable MKL when solving. MKL is typically faster than the built-in linear system solver.

GPU

If you have a GPU and cuDSS installed you can install the GPU direct sparse solver using

python -m pip install -Csetup-args=-Dlink_cudss=true -Csetup-args=-Dint32=true .

See here for how to enable the GPU when solving. The sparse direct GPU solver is typically very fast.

See here for an example colab where the cuDSS version of SCS, along with required dependencies, is installed and used.

Testing

To test that SCS installed correctly, and you have pytest installed, run

python -m pytest .

See here for the full SCS python API.

Legacy options

You can install with OpenMP parallelization support using

python legacy_setup.py install --scs --openmp

You can install the GPU indirect solver using

python legacy_setup.py install --scs --gpu