problem with gurobi backend in Sage 5.9 under Mac OS X 10.6.8

80 views
Skip to first unread message

Daniel Friedan

unread,
May 4, 2013, 12:10:42 AM5/4/13
to sage-s...@googlegroups.com
The gurobi backend does not seem to get built in Sage-5.9 under Mac OS X 10.6.8.  I'm running sage-5.9-OSX-64bit-10.6-x86_64-Darwin-app.  I have gurobi461 (the last version for OS 10.6.8).  It works in Sage-5.7 (after the installation method described below).

I copied from Sage-5.7 to Sage-5.9 the links Contents/Resources/sage/local/{lib/libgurobi.so,include/gurobi_c.h}.  Then, in Contents/Resources/sage/, I ran './sage -b'.  The output contained no mention of gurobi.

When I run Sage-5.9 and attempt to use solver="Gurobi" I get "ImportError: No module named gurobi_backend."  (The corresponding installation of CPLEX works fine in Sage-5.9.)

Daniel Friedan

Daniel Friedan

unread,
May 4, 2013, 3:07:45 PM5/4/13
to sage-s...@googlegroups.com
Installing gurobi works fine in Sage-5.8 also.  So the problem first appeared in Sage-5.9.

Nathann Cohen

unread,
May 4, 2013, 6:40:49 PM5/4/13
to sage-s...@googlegroups.com
Gloops ! You are right !

Gurobi is built if the two files exist, and the first of those is : SAGE_INC + "gurobi_c.h"
Looks like the value of SAGE_INC changed and does not end with a '/' anymore.

A patch fixes that. Very short patch, by the way :-)


In the meantime, you can either apply the patch or..... Create a symbolic link toward gurobi_c.h whose name is not "include/gurobi_c.h" but "includegurobi_c.h". Should work too :-D

Nathann 

Daniel Friedan

unread,
May 5, 2013, 8:47:46 AM5/5/13
to sage-s...@googlegroups.com
Thanks.  Making the link to "includegurobi_c.h" worked.

Daniel
Reply all
Reply to author
Forward
0 new messages