Re: Enthought Canopy and Gurobi on OS X 10.8

996 views
Skip to first unread message

Duehee Lee

unread,
Jan 12, 2014, 2:52:43 PM1/12/14
to gur...@googlegroups.com
Dear David

I am going to use the anaconda python.

Would you please tell me how I solve this problem when I use anaconda python?

Therefore, it would be very nice if you tell me the general solutions.

Thank you

Best Regards



On Saturday, April 13, 2013 10:48:39 AM UTC-5, David wrote:
When trying to use Gurobi with Enthought's latest Canopy (formerly EPD), you'll probably get something like

$ ipython 
 
In [1]: import gurobipy
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
 

or some Library not found error.

Here's what you need to do to get this fixed on Mac OS 10.8 (with Xcode installed):
  1. $ python setup.py install (skip this line if you already installed Gurobi in Canopy's site-packages)
  2. In your ~/.profile, append the following after Canopy's call to source the activation file:
    export DYLD_LIBRARY_PATH=/Library/gurobi550/mac64/lib:$DYLD_LIBRARY_PATH
    export DYLD_FRAMEWORK_PATH=/Library/gurobi550/mac64/lib:$DYLD_FRAMEWORK_PATH
     
  3. Fix the shared library (change USERNAME to your user name!)
    $ install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python /Users/USERNAME/Library/Enthought/Canopy_64bit/User/Python /Users/USERNAME/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/gurobipy/gurobipy.so

Step 3 needs to be repeated every time Gurobi is updated to a new version (until the issue is fixed of course).

Cheers,
David

Jakob Sch.

unread,
Jan 13, 2014, 3:12:57 AM1/13/14
to gur...@googlegroups.com
Dear Duehee,

gurobi supports only the shipped version of python (at least on MacOS X), therefore if the suggestion above does not help, it is very likely that it wont work...

Best regards,
Jakob
Reply all
Reply to author
Forward
0 new messages