I tried to install the gurobi package on python 3 but it didn't work. The command that i am using on my macbook is:
pip install gurobipy
, but it doesn't work, it shows me this:
ERROR: Could not find a version that satisfies the requirement gurobipy (from versions: none) ERROR: No matching distribution found for gurobipy`
On macOS gurobipy is automatically installed in the system's python installation. If you need to install it within another python installation or virtual environment, too, then you need to install gurobipy like described at the end of this section in the quickstart guide. It boils down to going to the installation directory of Gurobi, and running an installer script:
(venv) bash-3.2$ cd /Library/gurobi811/mac64/
(venv) bash-3.2$ python setup.py install
fyi for pip installs:
python -m pip install -i https://pypi.gurobi.com gurobipy
obtain the relevant license and activate using grbgetkey (have to download gurobi install files from website to access grbgetkey as that's not installed using pip
copy the gurobi.lic file wherever you initially installed it to the following directory: [your python dir]/site-packages/gurobipy/.libs **note there is an existing restricted install license in the directory, simply replace it.
Restart the kernel for python and the new license will be activated. No idea why Gurobi hasn't already published this info on their website for python pip installations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With