Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ECOS dependency #2301

Open
pwithams opened this issue Dec 10, 2023 · 2 comments
Open

Remove ECOS dependency #2301

pwithams opened this issue Dec 10, 2023 · 2 comments

Comments

@pwithams
Copy link

This feature is "planned" for 1.16 (https://www.cvxpy.org/updates/index.html#ecos-deprecation) so this issue can be viewed as a +1 for that plan and a request to expedite it if possible.

Is your feature request related to a problem? Please describe.
cvxpy (apache license) currently installs ecos (gpl license) by default. However, ecos is not actually required for some cxvpy functionality and so avoiding installing gpl packages currently requires manually installing cherry picked cvxpy dependencies. For example, doing a regular install of cvxpy will fail a pip-licenses check for gpl due to ecos (https://github.com/raimon49/pip-licenses#option-fail-on).

Describe the solution you'd like

index d3a8c91a..1592f7ad 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -37,7 +37,6 @@ name = "cvxpy"
 description = "A domain-specific language for modeling convex optimization problems in Python."
 dependencies = [
     "osqp >= 0.6.2",
-    "ecos >= 2",
     "clarabel >= 0.5.0",
     "scs >= 3.2.4.post1",
     "numpy >= 1.15",
@@ -59,8 +58,8 @@ CBC = ["cylp>=0.91.5"]
 CLARABEL = []
 CVXOPT = ["cvxopt"]
 DIFFCP = ["diffcp"]
-ECOS = []
-ECOS_BB = []
+ECOS = ["ecos>=2"]
+ECOS_BB = ["ecos>=2"]
 GLOP = ["ortools>=9.7,<9.8"]
 GLPK = ["cvxopt"]
 GLPK_MI = ["cvxopt"]

Describe alternatives you've considered

  1. Accepting that cvxpy is actually gpl and just not using the package, but this doesn't align with Switch from GPLv3 to Apache 2.0 #313
  2. Manually installing cherry picked dependencies as mentioned above, but this is difficult to maintain.
  3. Just waiting until 1.16 and hoping it's included.

Additional context
#313 mentions "cvxpy does not import the ecos interface or any other solver interface unless the user has installed that solver and tries to use it" which seems a prime candidate for optional install.
https://www.cvxpy.org/updates/index.html#ecos-deprecation expresses intent to do this exact change, just only in 1.16: " In 1.6, we plan to no longer install ECOS as a CVXPY dependency"

@phschiele
Copy link
Collaborator

Hi @pwithams!
As you say, the default installation of ECOS will be removed in 1.16.

Until then, you can simply install cvxpy-base plus a solver of your choice (e.g., clarabel, scs, or osqp), which is fairly easy to maintain.

@stonebig
Copy link

stonebig commented Jan 14, 2024

as ecos wheel is not available for Python-3.12 on Windows, making it optional unless "pip install cxvpy[ecos]" is asked, would be helpfull.

same for osqp, there shall be if possible a "pip install cxvpy[osqp]"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants