Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error by import numpy: lapack_lite.so: undefined symbol

After my Kubuntu (x86) has upgraded to 14.04, I got numpy not working in python 2.7:

Python 2.7.6 (default, Mar 22 2014, 22:59:38) 
[GCC 4.8.2] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/prylipko/.local/lib/python2.7/site-packages/numpy/__init__.py", line 137, in <module>
    import add_newdocs
  File "/home/prylipko/.local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "/home/prylipko/.local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 13, in <module>
    from polynomial import *
  File "/home/prylipko/.local/lib/python2.7/site-packages/numpy/lib/polynomial.py", line 17, in <module>
    from numpy.linalg import eigvals, lstsq
  File "/home/prylipko/.local/lib/python2.7/site-packages/numpy/linalg/__init__.py", line 48, in <module>
    from linalg import *
  File "/home/prylipko/.local/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 23, in <module>
    from numpy.linalg import lapack_lite
ImportError: /home/prylipko/.local/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so: undefined symbol: ATL_cpttrsm

I tried almost everything. Tried to re-install numpy (using pip), ATLAS, and LAPACK. I also tried to build numpy from sources, specifying the proper fortran compiler (gfortran=gnu95) used to build ATLAS.

Unfortunately, nothing helps. Could somebody suggest a recipe to fix it? I believe, I am not the only one in the Universe facing this problem. Thanks in advance.

like image 976
Dmytro Prylipko Avatar asked May 12 '14 15:05

Dmytro Prylipko


1 Answers

I encountered this same error, running Python 2.7.3 under Ubuntu 12.04 LTS.

An August 14 comment posted on the bug report noted in the comment above by Roland Smith suggested the following solution, which worked for me:

pip install --upgrade numpy
like image 151
gumption Avatar answered Nov 13 '22 00:11

gumption