Download the corresponding version of gurobi from the official website, here is an example for Linux.
-
unzip
tar -xvfz gurobi10.0.3_linux64.tar.gz
-
configuration Since IAGS calls gurobi in python, there are two ways to install the gurobipy library:
-
pip/conda:
# pip install pip install gurobipy # conda install conda install gurobipy
-
local installation
Execute the command in the unzipped gurobi/linux64 directory:
python setup.py install
-
-
Adding Environment Variables
Entering
vim ~/.bashrc
in the terminal and add it to the file afterwards:export GUROBI_HOME="/home/.../gurobi1003/linux64" # ... is the path where gurobi is installed export PATH="${PATH}:${GUROBI_HOME}/bin" export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
-
Reset environment variables
source ~/.bashrc
The academic license is free and activate for one year per activation.
-
Register and Login
-
Access to the user license portal
-
Apply for license
-
Get key
View the key you just applied for in the license screen and click on the second red box to view your key.
-
Activate gurobi
# Go to the gurobi installation directory cd /gurobi1003/linux64/bin # Activate the key you just requested # After successful activation, a gurobi.lic file will be created, which is stored in the current folder by default grbgetkey ********-****-****-****-***********
Updating environment variables is more similar to the steps taken during installation:
vim ~/.bashrc export GRB_LICENSE_FILE="/home/....../gurobi.lic"
-
Test