Solver (gurobi) did not exit normally
AnsweredHello,
I am using Python 3.8 and Gurobi 9.1.2.
While I am running the code, I am getting the following error:
ERROR: Solver (gurobi) returned non-zero return code (1)
ERROR: Solver log: Traceback (most recent call last):
File "<stdin>", line 5, in <module> File
"C:\ProgramData\Anaconda3\lib\site-
packages\pyomo\solvers\plugins\solvers\GUROBI_RUN.py", line 61, in
gurobi_run
model = read(model_file)
File "src\gurobipy\gurobi.pxi", line 3293, in gurobipy.read File
"src\gurobipy\gurobi.pxi", line 80, in gurobipy.gurobi.read File
"src\gurobipy\gurobi.pxi", line 32, in gurobipy.gurobi._getdefaultenv
File "src\gurobipy\env.pxi", line 67, in gurobipy.Env.__init__
gurobipy.GurobiError: No Gurobi license found (user bapakdemirel, host
DESKTOP-0LULDQJ, hostid c0a4fd37, cores 2)
Traceback (most recent call last):
File "C:\pyomo_VRP example\untitled3.py", line 43, in <module>
results=opt.solve(model)
File "C:\ProgramData\Anaconda3\lib\site-packages\pyomo\opt\base\solvers.py", line 595, in solve
raise ApplicationError(
ApplicationError: Solver (gurobi) did not exit normally
What should I do?
Any help is appreciated.
Thank you
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Basak,
The error message reads
No Gurobi license found (user bapakdemirel, host DESKTOP-0LULDQJ, hostid c0a4fd37, cores 2)
so you need to make sure to set up your Gurobi license correctly first.
Please check out this guide for further information: How do I obtain a free academic license? – Gurobi Support Portal
Cheers,
Matthias0 -
Thanks for reply.
I've already have the license. I am wondering about what should I do in this case?
0 -
Where did you place your \( \texttt{gurobi.lic} \) license file? By default, Gurobi looks for a \( \texttt{gurobi.lic} \) license file in \( \texttt{C:\gurobi} \) and your home directory. If you placed the license file somewhere else, you need to set the \( \texttt{GRB_LICENSE_FILE} \) environment variable. You can read more about this in the article How do I put the license file in an alternative location?.
0
Post is closed for comments.
Comments
4 comments