When I run the following code,
import pyomo.environ as pe
pers_solver = pe.SolverFactory('gurobi_persistent')
mymodel = pe.ConcreteModel()
pers_solver.set_instance(mymodel)
...I was getting the error Error message: Version number is 11.0, license is for version 10.0. According to this: https://support.gurobi.com/hc/en-us/articles/19581700936977
I should do 2 things:
-
- Check if my python version is compatible. I'm using python 3.9, which is supported by Gurobi 11.0 according to this: https://support.gurobi.com/hc/en-us/articles/360013195212.
-
- I should run
pip install gurobipy. I ran this and I got "requirement already satisfied".
- I should run
I checked /Library/gurobi1100/macos_universal2 and all of the necessary files seem to be there. So, I clearly have the license. What do I need to do to get Gurobi to recognize that it's compatible with my current version Python3.9?
As the error message states, this is a license key issue. You need to update your gurobi.lic license file.