Before using Gurobi Optimizer, you'll need to install the software on your computer.
In case you have the Gurobi Optimizer already installed on your machine and you would like to upgrade, please skip to Are you upgrading Gurobi? section.
Python only
If you plan to use Gurobi from Python only, you can use pip to install Gurobi for Python or use our Anaconda package instead. Details on the differences in the installation methods can be found in How do I install Gurobi for Python?
Full installation
Please open the subsection related to your platform to continue:
Windows
Your next step is to double-click on the Gurobi installer that you downloaded from our website (e.g., Gurobi-10.0.3-win64.msi for the 64-bit version of Gurobi 10.0.3).
Note: if you selected Run when downloading you've already run the installer and don't need to do it again.
By default, the installer will place the Gurobi 10.0.3 files in directory c:\gurobi1003\win64. The installer gives you the option to change the installation target. We'll refer to the installation directory as <installdir>.
Note that the installer can also be used to repair or remove a past installation.
Command-Line Installation
You can also install Gurobi 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-10.0.3-win64.msi /norestart
If you are unfamiliar with running command-line commands on a Windows system, you can learn more in How do I use the command line on Windows?
Video guide for Windows
Helpful tools
To work with compressed files within Gurobi Optimizer, we recommend that you install gzip (www.gzip.org) and/or 7zip (www.7-zip.org).
macOS
Your next step is to double-click on the appropriate Gurobi installer (e.g., gurobi10.0.3_macos_universal2.pkg for Gurobi 10.0.3) and follow the prompts.
By default, the installer will place the Gurobi 10.0.3 files in /Library/gurobi1003/macos_universal2 (note that this is the system /Library directory, not your personal ~/Library directory).
Your <installdir> will be /Library/gurobi1003/macos_universal2.
Video guide for MacOS
Linux
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), copy the Gurobi distribution to that directory, and then extract the contents:
tar xvfz gurobi10.0.3_linux64.tar.gz
This command will create a sub-directory /opt/gurobi1003/linux64 that contains the complete Gurobi distribution (assuming you chose /opt). Your <installdir> will be /opt/gurobi1003/linux64.
Gurobi Optimizer makes use of several executable files. In order to allow these files to be found when needed, you will need 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/gurobi1003/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/gurobi1003/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 for them to take effect.
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.
Video guide for Linux
Are you upgrading Gurobi?
Please refer to the subsequent articles for guidance on upgrading Gurobi based on the product:
- If you are upgrading Gurobi Optimizer, see How do I update my Gurobi installation to a newer version?
- If you are upgrading your Token Server, see How do I update my token server to a newer version?
- If you are upgrading the Compute Server, see How do I upgrade Compute Server?
Further information
- How do I install Gurobi for Python?
- How do I use Gurobi with NuGet?
- How do I install Gurobi for Matlab?
- How do I install Gurobi for R?
- How do I install Gurobi on a machine without internet access?
Comments
0 comments
Article is closed for comments.