Most Python installations come with the Python package management system “pip”.
Starting with Gurobi 9.1, you can use pip to download and install Gurobi into your currently active Python environment by opening a terminal window and issuing the following command:
python -m pip install gurobipy
This command instructs the called Python interpreter to download the
gurobipy extension from the public PyPI server (https://pypi.org) and install it into your Python environment. Note that our
gurobipy installation package is self-contained, so you can use it without any other software installation steps.
After the installation succeeds, you should see
gurobipyamong the installed packages listed upon typing python -m pip list. For example:
Using pip to install a specific version
Use this command to install a specific version:
python -m pip install gurobipy==10.0.1
Our pip package includes a limited license that allows you to solve small optimization problems.
The pip installation method does not provide Gurobi license tools. If you need to use grbgetkey to set up a license on your machine, then you will need to use one of the other installation methods or install the license tools package.
- Installing Gurobi Optimizer
- How do I install Gurobi for Python?
- How do I resolve a "Model too large for size-limited Gurobi license" error?
- Using conda to install the Gurobi for Python interface in Anaconda
- Obtaining a Gurobi license
Please sign in to leave a comment.