Skip to content

MIP not compatible with Gurobi 10.X #316

@brmanuel

Description

@brmanuel

Describe the bug
Trying to use python-mip with Gurobi version 10 installed results in
File "/usr/local/lib/python3.9/site-packages/mip/gurobi.py", line 75, in <module> s1 = lib_path.split('"')[-1].split("/")[-1] AttributeError: 'NoneType' object has no attribute 'split'

To Reproduce
Fire up a python repl and type import mip.gurobi

Expected behavior
The import should work.

Desktop (please complete the following information):

  • Dockerized linux
  • Python version: 3.9.9
  • Python-MIP version: 1.14.1

Additional context
The problem is the way mip searches for the Gurobi library.
It uses the following glob:
os.path.join(os.environ["GUROBI_HOME"], "lib/libgurobi[0-9][0-9].*"
Which will only match two-digit Gurobi versions, but not version 10.0 which appears as libgurobi100.so

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestgurobiAll items related to gurobi

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions