I'm new to cvxpy. Installed cvpxy using following command
conda install -c conda-forge lapack
conda install -c cvxgrp cvxpy
But while I'm trying to run the code knapsack_problem.solve(solver=cvxpy.GLPK_MI), I'm getting error message SolverError: The solver GLPK_MI is not installed.
GLPK is not installed by default. You can access GLPK by installing CVXOPT first.
We ran into the same issue, but with CVXOPT installed and importable, and GLPK_MI showing up in the installed solvers:
> print(cvxpy.installed_solvers())
['CVXOPT', 'ECOS', 'ECOS_BB', 'GLPK', 'GLPK_MI', 'OSQP', 'SCS']
With 1.0.25 (installed through conda on windows), when trying to solve a problem with the solver, we got:
> prob.solve(solver=cvxpy.GLPK_MI)
[...]
SolverError: The solver GLPK_MI is not installed
With 1.0.27, the problem is not there anymore. Not sure if this is the exact cause, just reporting that this solved it for us.
Most helpful comment
GLPK is not installed by default. You can access GLPK by installing CVXOPT first.