Site logoTungTT

How to install Gurobi

2 minutes
263 words

For anyone new to the Gurobi solver, and for students taking the Optimization course at the Faculty of Mathematics, Mechanics and Informatics, VNU University of Science.

Step 1: Download Gurobi from this link (scroll down to find the download files) and install it. gurobi_install

Step 2: Register a Gurobi account

Step 3: Request a Gurobi license.

  • Log in to Gurobi

  • Select My account gurobi_install

  • Select Review your current licenses under licenses gurobi_install

  • Go to Request and pick the license you want. If you're just starting out, choose Gurobi Limited license gurobi_install

  • Under licenses, you'll see the list of your licenses

Step 4: Activate the license on your computer

  • In the licenses section from the step above, pick the license you want and click the icon shown below gurobi_install
  • Copy the line that looks like grbgetkey [key] gurobi_install
  • Open a Terminal (PowerShell or Command Prompt on Windows) and run that line. If you get the result shown below, the installation was successful gurobi_install

Step 5: Install gurobipy open a Terminal (PowerShell or Command Prompt on Windows) and run

pip install gurobipy

Above are the steps to install Gurobi and activate a free license. This license can only solve small-sized problems (which is enough for the Optimization course at the Faculty of Mathematics, Mechanics and Informatics, VNU University of Science). For larger problems, you'll need to purchase a paid license or request an academic license (see how to request an academic license at quanhoang-pm).

Happy installing!