ImportError: cython_lapack.so: undefined symbol: undefined symbol: ztpqrt2_
Posted 一枪尽骚丶魂
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ImportError: cython_lapack.so: undefined symbol: undefined symbol: ztpqrt2_相关的知识,希望对你有一定的参考价值。
[root@Dragonwake python]# python python_csun.py 20190408143251033input.json
Traceback (most recent call last):
File "python_csun.py", line 6, in <module>
from scipy.interpolate import UnivariateSpline
File "/usr/local/lib/python2.7/site-packages/scipy/interpolate/__init__.py", line 175, in <module>
from .interpolate import *
File "/usr/local/lib/python2.7/site-packages/scipy/interpolate/interpolate.py", line 20, in <module>
import scipy.linalg
File "/usr/local/lib/python2.7/site-packages/scipy/linalg/__init__.py", line 207, in <module>
from ._decomp_update import *
File "_decomp_update.pyx", line 1, in init scipy.linalg._decomp_update
ImportError: /usr/local/lib/python2.7/site-packages/scipy/linalg/cython_lapack.so: undefined symbol: ztpqrt2_
查看lapack版本:
lapack-devel-3.2.1-5.el6.x86_64
在网上查了下_ztpqrt2.c
去官网:http://www.netlib.org/lapack/
上面看了一下版本信息
没有对应的库,于是这里卸载低版本lapack,安装高版本3.8
# yum remove lapack-devel
删除对应的blas-devel包
删除残留的库:
安装lapack3.8
参考:https://blog.csdn.net/baiyang3/article/details/52790793
解压
# tar -xxvf lapack-3.8.0.tar.gz
复制一份make.inc
cp make.inc.example make.inc
进入BLASE
# cd lapack-3.8.0/BLAS/
# gfortran -c -O3 SRC/*.f
# ar rv libblas.a *.o
# cp libblas.a /usr/lib64/
# cp ../BLAS/libblas.a testing/
编译cblas
# cd ../CBLAS/
# make
以上是关于ImportError: cython_lapack.so: undefined symbol: undefined symbol: ztpqrt2_的主要内容,如果未能解决你的问题,请参考以下文章
ImportError:无法导入名称 VarianceThreshold
橙色3:ImportError:无法导入名称'_variable'
ImportError:无法导入名称'password_reset'
ImportError:导入 dj_database_url ImportError:没有名为“dj_database_url”的模块