[Numpy-discussion] building numpy/scipy
Fri Jan 2 12:43:55 CST 2009
On Sat, Jan 3, 2009 at 3:29 AM, Mike Landis <email@example.com> wrote:
> Some of the install instructions are kind of ambiguous.
> When a library name ends in .a or .dll, it's obvious what it is, but
> 'library' is sometimes used generically without indicating whether
> you're talking about static or dynamic, e.g. how does numpy/scipy
> link to MKL? Is it statically or dynamically linked?
Dynamically first, statically if only the static library is found.
> It's not clear where things should go or how things are found. After
> downloading numpy and putting numpy-1.2.1 into a directory named
> numpy-1.2.1 in python2.5/Lib/site-packages/ and running python
> setup.py install from the numpy-1.2.1 directory, you get a numpy
> directory in site-packages. Later, the install instructions refer to
> the numpy directory generically. Which numpy directory are you
> talking about? Should the numpy-1.2.1 directory not be in
> site-packages in the first place?
No, it should certainly not be in site-packages. Why would you want to
do that ? site-packages is reserved for already built python modules.
It is a very bad idea to put anything else there.
> It should be possible to create a script that keeps track of all of
> these extra lib configuration steps, so installs won't be so involved
> and error prone.
There is no ambiguity: when referring to installation, it is
understood we refer to the source directory, always.
> What's compatible with what? There is mention of MKL, ATLAS, LAPACK
> and CLAPACK (I also downloaded CLAPACK 126.96.36.199). It seems like
> CLAPACK would be naturally compatible because python uses C-style
> matrix addressing, but does Python (or numpy) flip indexes around if
> you have LAPACK instead of CLAPACK, so it works anyway, if slower?
Numpy and Scipy supports the netlib F77 interface to both blas and
lapack. There is no real advantage to using CLAPACK/CBLAS instead of
those if you have the fortran interfaces.
> There is mention of ".numpy-site.cfg" in the user's home directory
> (which I created), but it didn't seem to have any effect on installing.
> I created the following site.cfg in the numpy (install) directory:
> include_dirs = D:\Programs\Intel\MKL\10.1.0.018\include
> library_dirs = D:\Programs\Intel\MKL\10.1.0.018\ia32\lib
> mkl_libs = mkl_ia32, mkl_c_dll, libguide40
> lapack_libs = mkl_lapack
There are many problems with the MLK - and I bet it does not work on
windows. You are much better of using the numpy and scipy binaries.
> Do numpy AND scipy each need a site.cfg in their respective install
> directories? If so, does one take precedence over the other?
When building, the site.cfg should be put in the *source* directory.
But again, particularly on windows, you should really use the
distributed binaries. Building numpy and scipy with external
BLAS/LAPACK is not easy, especially on windows.
More information about the Numpy-discussion