Gurobi doesn't work
AnsweredHi,
I tried to get access to Gurobi for python. I already have installed the license and the package. However, when importing Gurobi in my python script by:
import gurobipy as gp
from gurobipy import GRB
I get the following error message:
import gurobipy as gp
Traceback (most recent call last):
File "<ipython-input-2-e445dff78528>", line 1, in <module>
import gurobipy as gp
File "C:\Users\Vanja\anaconda3\lib\site-packages\gurobipy\__init__.py", line 3, in <module>
os.add_dll_directory(os.path.join(os.getenv('GUROBI_HOME'),'bin'))
File "C:\Users\Vanja\anaconda3\lib\ntpath.py", line 78, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Can anybody help me out?
0
-
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,
The same issue is discussed in the community post Failed to import gurobipy.
Best regards,
Jaromił0 -
Hi Jaromil,
Thank you for your response! I see that Chien has exactly the same question :) You answered that GUROBI_HOME has no value, which I understand. However, I still don't have a clue how to solve that...
Can you help me out?
Kind regards,
Vanja
0 -
Hi Vanja,
Let us please continue in the community post linked above to avoid duplicates.
Best regards,
Jaromił0
Post is closed for comments.
Comments
4 comments