Help with installing gurobipy 12.0.2
AnsweredHi,
I'm trying to use Gurobi 12.0.2 with gurobipy, but I have encounter some conflicting information. When I try to install with:~/Desktop/gurobi1200/linux64$ pip install -e.
I got error:
Obtaining file:///home/xuanlin/Desktop/gurobi1200/linux64
ERROR: Command errored out with exit status 1:
command: /home/xuanlin/py38env/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/xuanlin/Desktop/gurobi1200/linux64/setup.py'"'"'; __file__='"'"'/home/xuanlin/Desktop/gurobi1200/linux64/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info
cwd: /home/xuanlin/Desktop/gurobi1200/linux64/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/xuanlin/Desktop/gurobi1200/linux64/setup.py", line 3, in <module>
raise Exception(
Exception: The setup.py installation method has been removed, gurobipy should be installed using pip or conda. Please see https://support.gurobi.com/hc/en-us/articles/360044290292 for further information.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
This suggests that I should install through pip. However, when I do so according to your website:
Use this command to install a specific version:
python -m pip install gurobipy==12.0.2
I get error:
~/Desktop/gurobi1200/linux64$ python -m pip install gurobipy==12.0.2
ERROR: Could not find a version that satisfies the requirement gurobipy==12.0.2 (from versions: 9.1.0, 9.1.1, 9.1.2, 9.5.0, 9.5.1, 9.5.2b0, 9.5.2, 10.0.0b1, 10.0.0, 10.0.1, 10.0.2, 10.0.3, 11.0.0b1, 11.0.0, 11.0.1, 11.0.2, 11.0.3)
ERROR: No matching distribution found for gurobipy==12.0.2
How should I install gurobipy 12.0.2? Any guidance would be greatly appreciated!
Xuan Lin
-
Hi Xuan,
Installing with pip is the way to do it.
The error suggests your Python version is not compatible with v12.0.2. You should either upgrade your Python version (the preferred approach) or install an earlier version of gurobipy that is compatible. Please see the following article:
- Riley
0
Please sign in to leave a comment.
Comments
1 comment