The Spyder IDE

To launch theSpyderPython IDE, which is included in the Anaconda distribution, from the Windows Program menu (the installer should have placed it in the Anaconda folder). Gurobi Interactive Shell commands can be typed directly into the SpyderConsolewindow:

\scalebox{1.0}{\includegraphics[width=.9\textwidth]{graphics/spyder_linux1}}

If your Python environment doesn't have Spyder installed, you should be able to install it via the commandpython -m pip install spyder.

注意,一个通用的Python IDE像世爵requires one extra step to use Gurobi that isn't required when you launch the Gurobi shell from the Gurobi icon or by using thegurobi.batcommand: you must manually load the Gurobi module by typingfrom gurobipy import *(orimport gurobipy as gp) before issuing any Gurobi commands.

You can also use Spyder to run any of the Gurobi examples. For example, if you useOpenunder theFilemenu to open Gurobi examplemip1.py, and then click on theRunicon (the green triangle), you should see:

\scalebox{1.0}{\includegraphics[width=.9\textwidth]{graphics/spyder_linux2}}

Some Gurobi examples require command-line arguments. Those can be input from theConfigure...item of theRunmenu. For example, to run thesudoku.pyexample with filesudoku1as input ...

\scalebox{1.0}{\includegraphics[width=.9\textwidth]{graphics/spyder_linux3}}