The recent change to enable pickup of Gurobi 10.0 libraries has meant that all previous Gurobi versions are not findable, due to the glob-style matching. i.e. it now expects 3 digits like libgurobi100.so, not allowing for 2 digits like libgurobi95.so which many will still be using.
The code clause starting with "checking gurobi version" was not at the correct level of indentation. When no libfile was found from the globs, lib_path is still None, but gets called in lib_path.split and errors, instead of continuing to the next block of execution.
Fix: Rather than add more glob-style matches, this section is reworked with a very simple regex. The regex also allows extraction of the major_ver and minor_ver values, although these are not used.
I've tested this picks up the correct library for versions >=10 and <10 on Linux.
This PR addresses two small bugs:
The recent change to enable pickup of Gurobi 10.0 libraries has meant that all previous Gurobi versions are not findable, due to the glob-style matching. i.e. it now expects 3 digits like
libgurobi100.so
, not allowing for 2 digits likelibgurobi95.so
which many will still be using.The code clause starting with "checking gurobi version" was not at the correct level of indentation. When no libfile was found from the globs, lib_path is still None, but gets called in lib_path.split and errors, instead of continuing to the next block of execution.
Fix: Rather than add more glob-style matches, this section is reworked with a very simple regex. The regex also allows extraction of the major_ver and minor_ver values, although these are not used.
I've tested this picks up the correct library for versions >=10 and <10 on Linux.