Need help installing LAPACK/BLAS for CVXOPT (or a recommendation for another QP solver that's easier to install)

Question:

I’ve been trying to install CVXOPT, which requires LAPACK/BLAS and to be honest it’s killing me!

Context:

I am experimenting with an SVM and so need a QP solver. CVXOPT seems to be the best. The problem is the LAPACK/BLAS (or ATLAS) dependency.

I’ve tried installing ATLAS, which I thought worked, but when trying the CVXOPT install I still got “cannot find -lblas” and “cannot find -llapack”.

So for the last 2 days I’ve been trying to follow the various methods on http://icl.cs.utk.edu/lapack-for-windows/lapack/#libraries_mingw to install LAPACK, but it’s turning out to be the most ball crunchingly difficult installation I’ve ever had to preform, and I haven’t even started trying to install BLAS yet.

The question:

Could someone either:

A) Point me to an English translation of the LAPACK/BLAS install guides. Or some sort of simple method of instillation if such a thing exists.

OR

B) Point me to a QP solver which doesn’t require LAPACK/BLAS? So far I’ve not been able to find one that’s any easier to install.

Thanks!

Asked By: iRoygbiv

||

Answers:

Ok so I finally got the damn thing working. Here is what I did, for any poor soul who has to install CVXOPT in the future:

For the most part follow the instructions at http://abel.ee.ucla.edu/cvxopt/install/index.html#building-cvxopt-for-windows but you also must:

1) Download gnuwin32 from http://gnuwin32.sourceforge.net/ in order to use ‘sed’ command.

2) Download and use use cygwin NOT cmd for running all commands. This is because ‘sed’ and ‘make’ commands don’t work in cmd. Also when you are doing the cygwin install make sure you include the make command package which is under dev tools I think.

3) The following commands are slightly wrong:

sed 's/-mno-cygwin//g' -i'.bak' c:Python27Libdistutilscygwinccompiler.py

should be

sed 's/-mno-cygwin//g' -i'.bak' "c:Python27Libdistutilscygwinccompiler.py"

and

mv c:Python27Libdistutilscygwinccompiler.py.bak c:Python27Libdistutilscygwinccompiler.py

should be

mv "c:Python27Libdistutilscygwinccompiler.py.bak" "c:Python27Libdistutilscygwinccompiler.py"

Answered By: iRoygbiv

To install on windows download the MLK numpy binary and cvxopt binary.

First install MLK numpy then install cvxopt binary.

See this page for a link to both of those binaries:

Problems on installing cvxopt

9 times out of 10 this should work. Otherwise yes you’re stuck manually building. Congrats on figuring it out.

Answered By: ecoe

I followed the exactly Windows Tutorial of CVXOPT but I was having the “cannot find -lblas” and “cannot find -llapack” issues too.

What solved for me was instead of writing

 BLAS_LIB_DIR = ‘.’

I wrote:

 BLAS_LIB_DIR = ‘src’

And it worked. 🙂

Answered By: carla
BLAS_LIB_DIR = ‘src’

This solves the error "cannot find -lblas". But the error "cannot find -llapack" is still there.

Answered By: Mansi
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.