Error in CVXOPT/Python when using MOSEK solver

288 views
Skip to first unread message

Daniel Esteban Morales Bondy

unread,
Nov 8, 2013, 2:51:48 PM11/8/13
to cvx...@googlegroups.com
Hi,
I'm trying to solve a linear program using MOSEK and CVXOPT/Python, and I get an error. My setup is the following:
OS: OSX 10.9
Python 3.3.2 + numpy 1.7.1 + cvxopt 1.1.6
mosek 7

and the error I get is the following:

File "MPC.py", line 33, in battery_linprog
sol = solvers.lp(f, Al, bl, solver = 'mosek')
File "/Virtualenvs/science3/lib/python3.3/site-packages/cvxopt/coneprog.py", line 2890, in lp
from cvxopt import msk
File "/Virtualenvs/science3/lib/python3.3/site-packages/cvxopt/msk.py", line 29, in <module>
env.init()
AttributeError: 'Env' object has no attribute ‘init'

Is there a problem with my installation or what am I doing wrong? I would really appreciate any help I could get.

Matthías Páll Gissurarson

unread,
Apr 2, 2014, 6:35:05 PM4/2/14
to cvx...@googlegroups.com
This is an error I encountered as well, and It is fixed by simply removing the offending line (it is now handled in the __init__ function of the object, as it should). You will also encounter a problem with lines with task.getsolutionstatus(..), but they must be replaced with solsta = task.getsolsta(...) in msk.py. I've submitted these fixes to the github repo of cvxopt, so let's hope that they'll accept them soon (though this might indicate further problems, I wouldn't know, as I was only using the qp function).

Andrei Ignat

unread,
Apr 4, 2014, 10:20:55 AM4/4/14
to cvx...@googlegroups.com
Your fix worked for me as well.

Thanks,
Andrei
Reply all
Reply to author
Forward
0 new messages