1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Rep Power

    Cvxopt.glpk is not installed


    while running my project i got the following error:

    File "C:\Python27\solve_problem.py", line 112, in init_problem
    (duals,duals_eq,obj) = solve_relaxed(f,A,b,Aeq,beq)
    File "C:\Python27\solve_problem.py", line 83, in solve_relaxed
    sol = solvers.lp(matrix(f), matrix(A), matrix(B),matrix(Aeq), matrix(beq), s
    olver = 'glpk')
    File "C:\Python27\lib\site-packages\cvxopt\coneprog.py", line 2822, in lp
    except ImportError: raise ValueError("invalid option "\
    ValueError: invalid option (solver = 'glpk'): cvxopt.glpk is not installed

    Note that i already installed cvxopt module correctly.

    Any ideas?

    Thank you.
  2. #2
  3. Contributing User

    Join Date
    Aug 2011
    Rep Power
    Maybe cvxopt is installed correctly, but was not built with glpk included.

    What is the problem you're trying to solve?

    You can probably do it with scipy which has been around quite a while and works pretty well.

    [edit=based on Lux Perpetua's question in following post] scipy does not, as far as I can tell, have any routines designed for linear programming. (other than unconstrained simplex method) I did not investigate glpk.[/edit]
    Last edited by b49P23TIvg; October 18th, 2012 at 02:16 PM.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    San Francisco Bay
    Rep Power
    Does scipy do linear programming, though?

    moushakes12: why are you passing the "solver='glpk'" option to solvers.lp? Is there some reason you can't use cvxopt's default solver? If you must use the GLPK backend, you have to install GLPK separately.

IMN logo majestic logo threadwatch logo seochat tools logo