How to set the model solver
brunorbqi opened this issue · 1 comments
brunorbqi commented
Checklist
- I searched the documentation.
- I looked through similar issues on GitHub.
- I looked up "How to do ... in cobrapy" on a search engine.
Question
How can I set a solver other than gurobi for cobrapy ? In the cobrapy documentation says that glpk solver is used as default, but always when I load a model in cobrapy, shows that gurobi is being used. Once my license have expired I could not use cobrapy funcions. I tried use the 'model.solver = glpk' but not worked. There is any way other than model.solver to set the solver in cobrapy? Because even when others solvers are available looks like the gurobi overlaps. Best regards.
cdiener commented
Your syntax is slightly off. It would be model.solver = "glpk"
. Alternatively if you uninstall gurobi from your python environment it will use GLPK by default.