0
$\begingroup$

I am trying to setup Gurobi with Google OR-Tools with the function pywraplp.Solver.CreateSolver("GUROBI"). The function returns None, which could occur if Gurobi was not linked in, or if the Gurobi license is not supplied.

Currently, CreateSolver works with SCIP, and I could run Gurobi through the gurobipy interface (I have the licenses set up correctly).

I am using or-tools installed from pip (pip install ortools). Based on online documentation, the binary version of or-tools has support for Gurobi. I would like to know if there are any additional steps I need to take to set up or-tools, or if I must follow a set of instructions to compile or-tools from source to support Gurobi.

New contributor
Zach Zhao is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
3
$\begingroup$

You need to install the binary package locally, with a correct license.

It should pick it up at this point.

$\endgroup$
  • $\begingroup$ Could you clarify what you mean by installing the binary package locally? $\endgroup$ – Zach Zhao Jan 12 at 16:56
  • $\begingroup$ Get the official package from the gurobi site. $\endgroup$ – Laurent Perron Jan 12 at 17:27
  • $\begingroup$ I reinstalled gurobi - and or-tools does not pick it up. Are there any debug logs for ortools to output? I would like to know what kind of errors are propping up. $\endgroup$ – Zach Zhao Jan 12 at 17:51
  • $\begingroup$ I reinstalled both packages - and now both are working. Thank you! $\endgroup$ – Zach Zhao 2 days ago

Your Answer

Zach Zhao is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.