Gentoo Archives: gentoo-science

From: "Sébastien Fabbro" <bicatali@g.o>
To: gentoo-science@l.g.o
Subject: Re: [gentoo-science] liblapack, libblas, numpy, and python virtualenvs
Date: Thu, 17 Apr 2014 17:11:34
On Thu, Apr 17, 2014 at 8:29 AM, Grant Goodyear <g2boojum@×××××.com> wrote:

> For reproducibility, I like to have a python virtualenv that has all of > the python libraries that I use, relying on portage just for python, > virtualenv, and virtualenvwrapper. Building numpy using "pip install numpy" > fails if I use the science-overlay versions of the reference lapack and > blas libraries, because pip can't find liblapack to link to it. > > Right now I'm cheating and using the non-overlay versions, but I'm sure > that somebody has a better solution of how to help pip find the right > libraries. Help? >
The problem lies in the broken design of numpy.distutils trying to do way too much autodetection, and our ways to manage around it while keeping our linear algebra modularity. A possible workaround if you really want to use pip and the gentoo-science overlay framework is to simply link your selected blas and lapack libraries to /usr/lib/lib{blas,lapack}.so. I have not tested it, but I suspect this should work for openblas and {blas,lapack}-reference since they only have one library to link. Are you trying to do cross-distro reproducibility? Sebastien