|Gurobi/Python Use for Mac OS 10.6||Emily Frost||3/8/12 4:18 PM|
I am a new user of Gurobi, with a MacBook Pro running OS 10.6 as my
primary research computer. I would like to use Gurobi as my primary
optimizing software, but I would like to utilize it through the Gurobi/
Python interface. I'm having trouble importing .py files into the
optimizer -- I get an ImportError, which from reading other message
boards seems to be from the intersection of Gurobi, Python 2.7, and
Mac OS X. I've tried resetting/overwriting my version of Python with
version 2.6, but have been unsuccessful so far.
Ideal solution: step-by-step instructions on initializing the Gurobi-
Python interface for OS X, including code for importing a .py file
into the optimizer.
Thanks so much!
|Re: [Gurobi] Gurobi/Python Use for Mac OS 10.6||Greg Glockner||3/8/12 4:35 PM|
On Mac or Linux, you can always run a .py file as follows:
On Windows, simply change .sh to .bat:
Additionally, for Mac OS X, gurobi.sh is just a small wrapper around /usr/bin/python2.6, so gurobi.sh myprogram.py is equivalent to:
On Mac OS X, we only support the version of Python that is supplied by Apple. This means two things:
1. We don't support another version of Python, such as a version downloaded from python.org
Additionally, for Mac OS X, the installer automatically installs the gurobipy module for Python 2.6; there is no need to run setup for Mac OS X.
|Re: [Gurobi] Gurobi/Python Use for Mac OS 10.6||Vishal Gupta||1/11/13 5:53 AM|
I noticed in the recent release of Gurobi 5.1 that there is now support for Python2.7 on Mac OS X. Is this limited again to the Apple - version of python at:
I understand that currently this is the only version of Python supported by Gurobi, but are there any plans to support other versions? (For example, the one at python.org? Or, a 32-bit version of python?) Many packages available for python are not particularly compatible with the Apple version or with 64-bit versions.
Also, where is the best place to check WITHIN the Gurobi Documentation to monitor which version python is currently supported by Gurobi on Mac OSX?
Thanks so much for the help.
|Re: [Gurobi] Gurobi/Python Use for Mac OS 10.6||Greg Glockner||1/11/13 8:48 AM|
> I noticed in the recent release of Gurobi 5.1 that there is now support for Python2.7 on Mac OS X.Correct.
No plans for Mac OS X, but there is more flexibility for Windows and Linux.
We're supporting the version of Python that is distributed with OS X. We were stuck with Python 2.6 while we were supporting Snow Leopard (OS X 10.6), and we were able to upgrade to Python 2.7 with Gurobi Optimizer 5.1, which does not support Snow Leopard.