导入numpy时出错:lapack_lite.so:未定义的符号

时间:2014-05-12 15:12:26

标签: python-2.7 ubuntu numpy

在我的Kubuntu(x86)升级到14.04之后,我在nthony中没有使用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

我几乎尝试了一切。试图重新安装numpy(使用pip),ATLAS和LAPACK。我还尝试从源代码构建numpy,指定用于构建ATLAS的正确fortran编译器(gfortran = gnu95)。

不幸的是,没有任何帮助。有人可以提出修复方法吗? 我相信,我不是宇宙中唯一面临这个问题的人。 提前谢谢。

1 个答案:

答案 0 :(得分:6)

我遇到了同样的错误,在Ubuntu 12.04 LTS下运行Python 2.7.3。

上述bug report commentRoland Smith上发表的{{3}}发布的8月14日评论建议以下解决方案,对我有用:

pip install --upgrade numpy