Software Installation Guide

Before using the Gurobi Optimizer, you'll need to install the software on your computer. This section covers the installation of the entire Gurobi product. If you plan to use Gurobi from Python only, you can use our pip package or our Anaconda package instead.

When installing the full Gurobi product, your first steps are to visit our download page, find your platform (we'll assume Linux in this document), and choose the corresponding file to download.

\scalebox{1.0}{\includegraphics[width=10in]{graphics/download}}
Make a note of the name and location of the downloaded file.

Your next step is to choose a destination directory. We recommend /opt for a shared installation (assuming you have sudo privileges to write in that directory), or your home directory for a private installation, but other directories will work as well. You'll need to change your working directory to the destination directory (e.g., cd /opt or cd /home/jones), then copy the Gurobi distribution to that directory, and then extract the contents:

tar xvfz gurobi9.1.2_linux64.tar.gz

This command will create a sub-directory /opt/gurobi912/linux64 that contains the complete Gurobi distribution (assuming you chose /opt). Your <installdir> (which we'll refer to throughout this document) will be /opt/gurobi912/linux64.

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:

  • GUROBI_HOME should point to your <installdir>.
  • PATH should be extended to include <installdir>/bin.
  • LD_LIBRARY_PATH should be extended to include <installdir>/lib.
Users of the bash shell should add the following lines to their .bashrc files:

export GUROBI_HOME="/opt/gurobi912/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"

Users of the csh shell should add the following lines to their .cshrc files:

setenv GUROBI_HOME /opt/gurobi912/linux64
setenv PATH ${PATH}:${GUROBI_HOME}/bin
setenv LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib

If LD_LIBRARY_PATH is not already set, use the following instead:

  export LD_LIBRARY_PATH="${GUROBI_HOME}/lib"
or
  setenv LD_LIBRARY_PATH ${GUROBI_HOME}/lib
These paths should be adjusted to reflect your chosen <installdir>.

You'll need to close your current terminal window and open a new one after you have made these changes in order to pick up the new settings.

In some Linux distributions, applications launched from the Linux desktop won't read .bashrc (or .cshrc). You may need to set the Gurobi environment variables in .bash_profile or .profile instead. Unfortunately, the details of where to set these variables vary widely among different Linux distributions. We suggest that you consult the documentation for your distribution if you run into trouble.

You are now ready to proceed to the section on Retrieving Your Gurobi License.

If you would like an overview of the files included in the Gurobi distribution, you can also view the File Overview section.

If you are running Gurobi on a system with SELinux enforced, you should read this section.



Subsections

Try Gurobi for Free

Choose the evaluation license that fits you best, and start working with our Expert Team for technical guidance and support.

Evaluation License
Get a free, full-featured license of the Gurobi Optimizer to experience the performance, support, benchmarking and tuning services we provide as part of our product offering.
Academic License
Gurobi supports the teaching and use of optimization within academic institutions. We offer free, full-featured copies of Gurobi for use in class, and for research.
Cloud Trial

Request free trial hours, so you can see how quickly and easily a model can be solved on the cloud.

Search