Bug 714345

Summary: The linalg module from scipy cannot be loaded
Product: [Fedora] Fedora Reporter: Dominique Delande <Dominique.Delande>
Component: scipyAssignee: Jef Spaleta <jspaleta>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: gwync, jspaleta, orion, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-19 19:30:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Dominique Delande 2011-06-18 09:46:08 UTC
Description of problem: when trying to use the linalg module from scipy, it fails because of "clapack_sgesv" undefined symbol

Version-Release number of selected component (if applicable): scipy-0.9.0-1.fc15.x86_64

How reproducible: always

Steps to Reproduce:
1. Start a python interpreter (tested with 2.7.1 (r271:86832, Apr 12 2011, 16:15:16) from Fedora 15)
2.Type "from scipy import linalg" inside the interpreter
3.
  
Actual results: Error message:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/site-packages/scipy/linalg/__init__.py", line 9, in <module>
    from basic import *
  File "/usr/lib64/python2.7/site-packages/scipy/linalg/basic.py", line 14, in <module>
    from lapack import get_lapack_funcs
  File "/usr/lib64/python2.7/site-packages/scipy/linalg/lapack.py", line 15, in <module>
    from scipy.linalg import clapack
ImportError: /usr/lib64/python2.7/site-packages/scipy/linalg/clapack.so: undefined symbol: clapack_sgesv
>>> 

Expected results: Loading of the module

Additional info: Googling reports similar observations, but no workaround

Comment 1 Thomas Spura 2011-06-18 21:11:52 UTC
This highly sounds like bug #709782.

Could you please give the output of:
python -c "from scipy import linalg"
echo $PYTHONPATH
echo $LD_LIBRARY_PATH
rpm -qa | grep atlas
rpm -qa | grep lapack

Should be a bug with your installation (and proper lapack.so is found before atlas lapack).

Comment 2 Jef Spaleta 2011-06-18 22:16:26 UTC
I cannot reproduce this on a clean F15. I bet this is an LD_LIBRARY_PATH issue for sure.

<rant>
LD_LIBRARY_PATH is such a huge pain sometimes.

There are so many pieces of poorly engineered scientific computing codebeases out in the wild which instruct users to manipulate LD_LIBRARY_PATH in top level shell configs to work around old or missing system libraries, and it causes so many problems.
</rant>

Comment 3 Dominique Delande 2011-06-19 19:30:06 UTC
I checked my LD_LIBRARY_PATH and, indeed, /usr/lib64/atlas was absent, due to some manipulation done in my .bashrc file. Thus, it picked the lapack library in /usr/lib64, the one from the lapack package.
I apologize for the mistake. I think that the bug can be closed.