-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Labels
gurobiAll items related to gurobiAll items related to gurobi
Description
Describe the bug
If Gurobi is installed via pip (see e.g. here), then the .so file does not conform to the current style set out in mip/gurobi.py.
To Reproduce
pip install mippip install -i https://pypi.gurobi.com gurobipy- `setenv GUROBI_HOME='xxx'
- It doesn't work
Expected behavior
I think it would be nice if it happened.
Desktop (please complete the following information):
- Operating System, version: Linux [note: this does not happen under Mac]
- Python version: 3.7
- Python-MIP version (we recommend you to test with the latest version): latest
Additional context
I think a possible fix would look like this, i.e. to add this after the first is not libfile:
if not libfile: # For pip installer
libfile = glob(
os.path.join(os.environ["GUROBI_HOME"], "gurobipy.*.so")
)
For Linux, the .so file is named: gurobipy.cpython-37m-x86_64-linux-gnu.so. This would though mean that the version number deduction with major_ver and minor_ver in gurobi.py does not work and the subsequent definition of lib_path does not work either. Not sure how to handle this, which is why I did not make a PR.
Metadata
Metadata
Assignees
Labels
gurobiAll items related to gurobiAll items related to gurobi