How to Set the License File for PIP Installation of the Python Gurobi (`gurobipy`)
AnsweredI installed `gurobipy` using:
pip install gurobipy
Now I want to configure it to use my license on a Python script.
I have a license installed in a non standard path.
I tried using:
os.environ['GUROBI_HOME'] = "D:/MyPath/Gurobi";
os.environ['GRB_LICENSE_FILE'] = "D:/MyPath/Gurobi/gurobi.lic";
Yet it doesn't seem to work.
How can I configure my PIP installation to use a custom path for a license file?
1
-
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?. -
I'm having the same issue.
0 -
Currently it is not possible on Windows due to OS specific handling of environment variables.
This approach currently only works on Linux and Mac. On Windows you have to set the environment variable outside of Python.
Best regards,
Jaromił0
Post is closed for comments.
Comments
3 comments