Installation¶
Prerequisites¶
You should first install CVXPY 1.5 or greater.
Quick Install¶
Install DCCP from PyPI using pip:
pip install dccp
Development Install¶
To install the development version, clone the repository and install in development mode:
git clone https://github.com/cvxgrp/dccp.git
cd dccp
pip install -e .
Verify Installation¶
You can verify the installation by running a simple example:
import cvxpy as cp
import dccp
# create a simple problem
x = cp.Variable(2)
y = cp.Variable(2)
problem = cp.Problem(cp.Maximize(cp.norm(x - y, 2)), [0 <= x, x <= 1, 0 <= y, y <= 1])
# check if it's DCCP
print("Problem is DCCP:", dccp.is_dccp(problem))