Skip to content

Commit d6b19a4

Browse files
authored
fix: don't init gurobi on import (#548)
1 parent 304cc64 commit d6b19a4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

linopy/solvers.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,7 @@ def _target() -> None:
129129
with contextlib.suppress(ModuleNotFoundError):
130130
import gurobipy
131131

132-
try:
133-
with contextlib.closing(gurobipy.Env()):
134-
available_solvers.append("gurobi")
135-
except gurobipy.GurobiError:
136-
pass
132+
available_solvers.append("gurobi")
137133
with contextlib.suppress(ModuleNotFoundError):
138134
_new_highspy_mps_layout = None
139135
import highspy

0 commit comments

Comments
 (0)