Starting with version 11.0.2, the Gurobi Interactive Shell has been deprecated. This means its use is discouraged but it will remain a part of the Gurobi installation in version 12. The interactive shell will be removed entirely in version 13, which is planned for publication in late 2025.
The Gurobi Interactive Shell is nothing more than a standard Python shell with the gurobipy namespace imported. It can be replicated by installing Gurobi in your Python environment, invoking a Python shell from the command line in your favorite terminal (see recommendations below) and executing the following line in the Python shell.
from gurobipy import *
This line makes available those commands found in the Gurobi Interactive Shell.
For guidance on installing Gurobi in Python please see the following articles:
Recommended terminal applications:
- Windows: Windows Terminal, Powershell
- MacOS: Terminal, iTerm2
Frequently Asked Questions:
Q: I used the interactive shell to verify that the license file is installed properly. What should I do now?
A: Running Gurobi from the command line within your terminal is preferred. Use the command gurobi_cl --license
to verify the license is found.
Q: I used the interactive shell to run LP and MPS model files. What should I do now?
A: Running Gurobi from the command line within your terminal is preferred, and much faster. Here are some examples:
gurobi_cl glass4.mps
gurobi_cl TimeLimit=10 LogFile="glass4.log" /user/models/glass4.mps.bz2
gurobi_cl MIPFocus=2 Presolve=2 /user/models/glass4.lp
Q: I used the interactive shell to run tuning experiments. What should I do now?
A: gurobi_cl
is not the only command line tool that is installed with Gurobi! The command line tool grbtune
provides the ability to tune models. It is both easier to use and more powerful. Read more about grbtune here.
Q: I used the interactive shell in multiple terminal windows, is there an alternative?
A: You can create multiple command line terminals and within each, start an interactive Python session and import the gurobipy namespace. Nice terminal applications even provide tabs, which can run separate sessions within the one window.
Q: My company has strict controls on installing Python. The Gurobi Interactive Shell was safe to use, wasn't it?
A: Anything that can be done (including running malicious code, downloading files, installing 3rd party packages) in a standard Python environment can be done in the Python executable that ran the Gurobi Interactive Shell. Consequently, the same security concerns regarding the installation of Python apply to installing Gurobi because of the Python executable inside. Removing the Gurobi Interactive Shell reduces the security concerns around the installation of Gurobi.
Comments
0 comments
Article is closed for comments.