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 seegurobipy
among the installed packages listed upon typing python -m pip list. For example:
Package Version
------------------- -----------
gurobipy 10.0.1
pip 20.2.1
setuptools 49.2.1
Using pip to install a specific version
Use this command to install a specific version:
python -m pip install gurobipy==10.0.1
License notes
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.
Further information
- 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
Comments
0 comments
Please sign in to leave a comment.