I'm trying to install the python package cvxopt via pip into a virtual environment on a Centos 6 system.
Since lapack is a prerequisite, and since I don't have superuser access to the system, I've installed lapack locally using the following:
$ cmake -DCMAKE_INSTALL_PREFIX=/home/tom .
$ make install
I notice that after this step liblapack.a
is located in my local lib directory, /home/tom/lib
, as expected.
However, when I activate my virtual environment and run pip install cvxopt
I get the following error:
<snip>
gcc -pthread -shared
build/temp.linux-x86_64-2.7/src/C/base.o
build/temp.linux-x86_64-2.7/src/C/dense.o
build/temp.linux-x86_64-2.7/src/C/sparse.o
-L/usr/lib -L/public/apps/python/2.7.4/lib
-lm -llapack -lblas -lpython2.7 -o build/lib.linux-x86_64-2.7/cvxopt/base.so
/usr/bin/ld: cannot find -llapack
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
I've tried adding /home/tom/lib
to both LD_LIBRARY_PATH
and LD_RUN_PATH
but neither of these seem to affect the gcc
command line options that pip
is using to build the module.
Can anyone tell me how to give library search paths to pip
? Is there a better way?