Edit: I worked around this by installing anaconda's python 3.7. Not sure why this worked, but it did!
So I've been struggling with this a few hours. I have used Gurobi on Linux/Mac before-- but I just got a desktop running Windows and was excited to break it in with some ILPs.
I installed Python 3.7.4, and then installed Gurobi 8.1.1 and activated my license key.
I primarily use the Python interface, so I went ahead and ran the setup.py install script. The output indicates that it worked.
C:\gurobi811\win64>python setup.py install
copying python37\lib\gurobipy\__init__.py -> build\lib\gurobipy
copying python37\lib\gurobipy\gurobipy.pyd -> build\lib\gurobipy
However, when I run Python and attempt to import gurobipy, I get an error.
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import gurobipy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\12096\AppData\Local\Programs\Python\Python37-32\lib\site-packages\gurobipy\__init__.py", line 1, in <module>
from .gurobipy import *
ImportError: DLL load failed: %1 is not a valid Win32 application.
Please help. I've looked at similar issues reported. Generally, it seems like if I get this Import Error, then I didn't run the setup.py install script, but I did run the script and I'm still getting the error.
Please sign in to leave a comment.