Installing CVXOPT + GLPK in Mac OS X (Leopard)

223 views
Skip to first unread message

Guilherme Freitas

unread,
Nov 6, 2009, 9:52:53 PM11/6/09
to CVXOPT
Hi everybody,

For some reason, I can't install CVXOPT with support for GLPK. It
seems that GSL, FFTW and DSDP support are also missing.

Here is what I did to install CVXOPT. First I installed the GSL, GLPK,
FFTW and DSDP. All compiled without a problem, and I ran tests at
least for the GSL and GLPK. Then, I edited the 'setup.py' file setting
the variables accordingly (see end of this message for a copy of the
relevant section of my 'setup.py'). Then I installed CVXOPT. In the
end, cvxopt installs perfectly, but the 'glpk' module is not there.
Here is what I get with a 'import cvxopt; dir(cvxopt)":

In [3]: dir(cvxopt)
Out[3]:
['__all__',
'__builtin__',
'__builtins__',
'__doc__',
'__file__',
'__name__',
'__path__',
'base',
'cos',
'div',
'exp',
'getseed',
'log',
'matrix',
'matrix_repr',
'matrix_str',
'max',
'min',
'mul',
'normal',
'omax',
'omin',
'printing',
'setseed',
'sin',
'sparse',
'spdiag',
'spmatrix',
'spmatrix_repr',
'spmatrix_str',
'sqrt',
'uniform']

If it matters, I am using the Enthought Python Distribution, EPD,
their latest stable release.

Thanks everybody

--Guilherme



[Part of my 'setup.py']
---------------------------------------------------------------------------------------------------
# directory containing libblas and liblapack
ATLAS_LIB_DIR = '/Developer/SDKs/MacOSX10.5.sdk/usr/lib'

# Set to 1 if you are using the random number generators in the GNU
# Scientific Library.
BUILD_GSL = 1

# Directory containing libgsl (used only when BUILD_GSL = 1).
GSL_LIB_DIR = '/usr/local/lib'

# Directory containing the GSL header files (used only when BUILD_GSL
= 1).
GSL_INC_DIR = '/usr/local/include'

# Set to 1 if you are installing the fftw module.
BUILD_FFTW = 1

# Directory containing libfftw3 (used only when BUILD_FFTW = 1).
FFTW_LIB_DIR = '/usr/local/lib'

# Directory containing fftw.h (used only when BUILD_FFTW = 1).
FFTW_INC_DIR = '/usr/local/include'

# Set to 1 if you are installing the glpk module.
BUILD_GLPK = 1

# Directory containing libglpk (used only when BUILD_GLPK = 1).
GLPK_LIB_DIR = '/usr/local/lib'

# Directory containing glpk.h (used only when BUILD_GLPK = 1).
GLPK_INC_DIR = '/usr/local/include'

# Set to 1 if you are installing the DSDP module.
BUILD_DSDP = 1

# Directory containing libdsdp (used only when BUILD_DSDP = 1).
DSDP_LIB_DIR = '/Users/guilherme/lib/DSDP5.8/lib'

# Directory containing dsdp5.h (used only when BUILD_DSDP = 1).
DSDP_INC_DIR = '/Users/guilherme/lib/DSDP5.8/include'

---------------------------------------------------------------------------------------------------

Martin

unread,
Nov 7, 2009, 2:25:22 PM11/7/09
to CVXOPT
Did you try 'from cvxopt import glpk'?

On Nov 6, 6:52 pm, Guilherme Freitas <guilherme.frei...@gmail.com>
wrote:

Guilherme Freitas

unread,
Nov 10, 2009, 6:16:57 PM11/10/09
to CVXOPT
Yes, it gives me an error, saying something like "the module glpk is
not available" or "was not built". I don't have my computer with me
right now, but I can give you the precise error message later.

Best,

Guilherme

On Nov 7, 11:25 am, Martin <martin.skovgaard.ander...@gmail.com>
wrote:

Guilherme Freitas

unread,
Nov 10, 2009, 6:18:19 PM11/10/09
to CVXOPT
And I am using CVXOPT 1.1.1

On Nov 10, 3:16 pm, Guilherme Freitas <guilherme.frei...@gmail.com>
Reply all
Reply to author
Forward
0 new messages