question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ENV versus site.cfg for LAPACK

See original GitHub issue

WIth numpy 1.10.1 and reference (netlib) lapack installed to:

/usr/lib64/libreflapack.so -> libreflapack.so.3
/usr/lib64/libreflapack.so.3 -> libreflapack.so.3.6.0
/usr/lib64/libreflapack.so.3.6.0

Everything seems good:

% LAPACK=/usr/lib64/libreflapack.so python setup.py config > output.txt
% tail -15 output.txt 

lapack_info:
Replacing _lib_names[0]=='lapack' with 'reflapack'
Replacing _lib_names[0]=='reflapack' with 'reflapack'
Replacing _lib_names[0]=='reflapack' with 'reflapack'
Replacing _lib_names[0]=='reflapack' with 'reflapack'
  FOUND:
    libraries = ['reflapack', 'reflapack']
    library_dirs = ['/usr/lib64']
    language = f77
    runtime_library_dirs = ['/usr/lib64']

  NOT AVAILABLE

running config

However, trying to recreate that with a simple site.cfg file fails (I’ve also tried various permutations of library_dirs and others to no avail):

% cat site.cfg
[lapack]
libraries=reflapack
% python setup.py config > output.txt
% cat output.txt
*****snip******
lapack_info:
  libraries lapack not found in ['/usr/lib64']
  NOT AVAILABLE
******snip*****

I think a hint to the issue is in the working output.txt file above: when it says Replacing _lib_names[0]=='lapack' with 'reflapack'. My guess is that for some reason (deep in numpy/distutils/system_info.py) the LAPACK env variable causes the library name to be changed, but the [lapack] section does not.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mattipcommented, Aug 16, 2019

it seems site.cfg is woefully under-documented, the closest I could find is using env values but does not mention site.cfg. Closing this and opening #14286

0reactions
bsipoczcommented, Aug 16, 2019

It seems that this question has been answered, maybe close the issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

numpy/site.cfg.example at main - GitHub
This file provides configuration information about non-Python dependencies for. # numpy.distutils-using packages. Create a file like this called "site.cfg" ...
Read more >
Supplying NumPy site.cfg arguments to pip - Stack Overflow
I'm using NumPy built against Intel's Math Kernel Library. I use virtualenv, and typically use pip to install packages. However, in order for ......
Read more >
Bug 386269 - Gentoo's Bugzilla
scipy doesn't look for site.cfg in its own build directory if it finds one in numpy. It only uses its own if there...
Read more >
Building from source — NumPy v1.23 Manual
NumPy searches for optimized linear algebra libraries such as BLAS and LAPACK. There are specific orders for searching these libraries, as described below...
Read more >
scipy install problem when setting up Intro to Machine learning ...
numpy/distutils/site.cfg file (section [atlas]) or by setting the ATLAS environment variable. warnings.warn(AtlasNotFoundError.__doc__) lapack_info:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found