Re: [Gurobi] No module named gurobipy

892 views
Skip to first unread message

Greg Glockner

unread,
Nov 18, 2012, 9:12:02 AM11/18/12
to gur...@googlegroups.com
> veit$ gurobi.sh
> Python 2.6.7 (r267:88850, Jun 20 2012, 16:23:38)
> [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> Traceback (most recent call last):
> File "/usr/local/lib/gurobi.py", line 5, in <module>
> from gurobipy import *
> ImportError: No module named gurobipy

This can happen on Mac OS X due to a system upgrade, such as an upgrade to Mountain Lion. The fix is simply to reinstall Gurobi Optimizer. And you might as well upgrade to the latest version while you do that. Remember that a new license key is not required unless your license key has either expired or it was for a different major version -- for example, if you had a license for version 4 after version 5 was released.


> I was hoping to be able to use gurobi in the interactive shell, but it seems I need to know how to use python as well (and I don't). Is there a simple fix?

This isn't an issue of knowing the Python shell.

Also, you don't have to use the Python shell. You can use gurobi_cl, MATLAB, R or any of the traditional APIs -- C, C++, Java or .NET.

Veit Elser

unread,
Nov 18, 2012, 12:31:42 PM11/18/12
to <gurobi@googlegroups.com>
Thanks Greg. It works now and, not surprisingly, is much faster than glpk.

-Veit

On Nov 18, 2012, at 9:12 AM, Greg Glockner <gloc...@gurobi.com>
wrote:
Reply all
Reply to author
Forward
0 new messages