Failed to create new environment in gurobipy
Awaiting user inputIn order to suppress unnecessary console logs, I tried to follow the instruction in https://support.gurobi.com/hc/en-us/articles/360044784552-How-do-I-suppress-all-console-output-from-Gurobi to create a new environment in gurobipy and create a new model within this environment.
However, for some reason this always fails with "Failed to create new environment" in the line:
with gp.Model(env=env) as m:
But if I just run it without attaching the environment (by using the default environment), i.e.:
m = gp.Model("test")
Then it has no problem running at all - just that it will produce lots of unnecessary output because I am running many models sequentially.
Anyone has idea why this problem arises?
I have an academic license.
-
Official comment
This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support. -
Hi Zhipeng,
When you use
gp.Model("test")Gurobi will be using a default environment.
When you use
with gp.Model(env=env) as m:
you are specifying a (probably non-default) environment.
Can you provide the code where you are creating env? (Please replace any license details in this code with junk if applicable).
- Riley
0
Post is closed for comments.
Comments
2 comments