1
$\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.

$\endgroup$

1 Answer 1

4
$\begingroup$

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

It should pick it up at this point.

$\endgroup$
4
  • $\begingroup$ Could you clarify what you mean by installing the binary package locally? $\endgroup$
    – Zach Zhao
    Jan 12, 2021 at 16:56
  • $\begingroup$ Get the official package from the gurobi site. $\endgroup$ Jan 12, 2021 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, 2021 at 17:51
  • $\begingroup$ I reinstalled both packages - and now both are working. Thank you! $\endgroup$
    – Zach Zhao
    Jan 12, 2021 at 19:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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