Python

Gurobi comes with a Python extension module called “gurobipy” that offers convenient object-oriented modeling constructs and an API to all Gurobi features. The Gurobi distribution also includes a Python interpreter and a basic set of Python modules (see the interactive shell), which are sufficient to build and run simple optimization models. You can also install gurobipy into an existing Python installation or virtual environment (https://docs.python.org/3/library/venv.html).

In this section, we will first review installation options. We then point out some useful Python tools and their installation. Finally, we introduce you to the basic usage of gurobipy by means of a few concrete examples.



Subsections