The first step in using the Gurobi Optimizer is to install the relevant files on your computer. You should have obtained a distribution package from the Gurobi Web site (www.gurobi.com). The name of this package will depend on the version of the Gurobi Optimizer you have and the platform on which it is intended to run. The file Gurobi-5.0.0-win32.msi, for example, installs the 32-bit version of Gurobi 5.0.0 on a machine that runs a Microsoft Windows® operating system. The file gurobi5.0.0_linux64.tar.gz, on the other hand, installs the 64-bit version on a machine that runs a supported distribution of the Linux® operating system.
The steps required to install the Gurobi Optimizer differ on Windows, Linux, and Mac OS systems. Detailed instructions for each platform follow.
Installation - Windows
To install the Gurobi optimizer on your Windows machine, simply double-click on the appropriate Gurobi installer (e.g., Gurobi-5.0.0-win32.msi for the 32-bit version of Gurobi 5.0.0). By default, the installer will place the Gurobi 5.0.0 files in directory c:\gurobi500\win32 (or c:\gurobi500\win64 for 64-bit Windows installs). The installer gives you the option to change the installation target. We'll refer to the installation directory as <installdir>.
By default, Gurobi is installed for use by the current Windows user only. If you would like to install Gurobi for all users, you may do so using the command line interface to the Windows Installer: open a cmd prompt, use cd to go to the directory that contains the Gurobi installer image, and enter the following command:
msiexec /i Gurobi-5.0.0-win32.msi allusers=1
If you would like to work with compressed files from within the Gurobi Optimizer, we recommend that you also install gzip and/or 7zip. They can be downloaded from www.gzip.org and www.7-zip.org, respectively.
Once installation is complete, you should see a Gurobi desktop shortcut that can be used to launch the Gurobi Interactive Shell. You shouldn't try to launch Gurobi quite yet. Doing so will produce a lengthy error message indicating that you haven't yet installed a license key.
You are now ready to proceed to the section on How to Obtain and Install a Gurobi License.
If you would like an overview of the files included in the Gurobi distribution, you can also view the File Overview section.
Installation - Linux
The first step in installing the Gurobi Optimizer on a Linux system is to choose a destination directory. We recommend /opt for a shared installation, but other directories will work as well.
Once a destination directory has been chosen, the next step is to copy the Gurobi distribution to the destination directory and extract the contents. Extraction is done with the following command:
tar xvfz gurobi5.0.0_linux64.tar.gzThis command will create a sub-directory gurobi500/linux64 that contains the complete Gurobi distribution. In the default case, your <installdir> is /opt/gurobi500/linux64. The file and directory names should of course be adjusted to reflect the actual distribution being installed (i.e., extracting the 32-bit Linux distribution (gurobi5.0.0_linux32.tar.gz) would create /opt/gurobi500/linux32).
The Gurobi Optimizer makes use of several executable files. In order to allow these files to be found when needed, you will have to modify a few environment variables:
export GUROBI_HOME="/opt/gurobi500/linux64" export PATH="${PATH}:${GUROBI_HOME}/bin" export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"Users of the csh shell would add the following lines to their .cshrc files...
setenv GUROBI_HOME /opt/gurobi500/linux64 setenv PATH ${PATH}:${GUROBI_HOME}/bin setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${GUROBI_HOME}/libIf LD_LIBRARY_PATH is not already set, you would use the following instead:
export LD_LIBRARY_PATH="${GUROBI_HOME}/lib"or
setenv LD_LIBRARY_PATH ${GUROBI_HOME}/libAgain, these paths should be adjusted to reflect the actual distribution being installed.
You are now ready to proceed to the section on How to Obtain and Install a Gurobi License.
If you would like an overview of the files included in the Gurobi distribution, you can also view the File Overview section.
Installation - Mac OS
To install the Gurobi Optimizer on your Mac, simply double-click on the appropriate Gurobi installer (e.g., gurobi5.0.0_mac64.pkg for Gurobi 5.0.0) and follow the prompts. By default, the installer will place the Gurobi 5.0.0 files in /Library/gurobi500/mac64.
You are now ready to proceed to the section on How to Obtain and Install a Gurobi License.
If you would like an overview of the files included in the Gurobi distribution, you can also view the File Overview section.