This is only for Gurobi 9.0.1 and is not affecting the Anaconda Python 3.8 distribution, which is our recommended way of using Python on Windows.
- Windows, Python 3.8.1 from http://www.python.org
- after running python setup.py install, importing gurobipy fails with this error
from .gurobipy import *
ImportError: DLL load failed while importing gurobipy:
The specified module could not be found.
You need to tell Python how to find the library again. This can be done either by
- copying the gurobi90.dll from C:\gurobi901\win64\bin\ to PYTHON_INSTALLATION_PATH\lib\site-packages\gurobipy\ or by
- specifying how the library can be found within the current Python environment:
Note that in the second case, this has to be done every time before import gurobipy, while the first solution is permanent.
There is a new Windows safety feature that changes how DLLs are loaded in Python 3.8 and that affects the installation of Gurobi.
We are going to integrate this into the distribution for future releases.