Python 3.5 Scipy优化导入错误

时间:2016-03-08 01:37:55

标签: python

尝试使用模块scipy.optimize.slsqp时遇到以下问题。

>>> import scipy.optimize.slsqp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/site-packages/scipy/optimize/__init__.py",      
line 233, in <module>
from ._minimize import *
File "/usr/local/lib/python3.5/site- 
packages/scipy/optimize/_minimize.py", line 26, in <module>
from ._trustregion_dogleg import _minimize_dogleg
File "/usr/local/lib/python3.5/site- 
packages/scipy/optimize/_trustregion_dogleg.py", line 5, in <module>
import scipy.linalg
File "/usr/local/lib/python3.5/site-packages/scipy/linalg/__init__.py", 
line 190, in <module>
from ._decomp_update import *
File "scipy/linalg/_decomp_update.pyx", line 1, in init 
scipy.linalg._decomp_update (scipy/linalg/_decomp_update.c:39096)
ImportError: /usr/local/lib/python3.5/site- 
packages/scipy/linalg/cython_lapack.cpython-35m-x86_64-linux-gnu.so: 
undefined symbol: zlacn2

我使用的是Python3.5,Scipy 0.17.0,Numpy 1.10.1,操作系统是CentOS 5.11。任何人都可以对此有所了解吗?谢谢。

2 个答案:

答案 0 :(得分:0)

您需要安装SciPy数学依赖项。

parentScope.topPosition = positions[this.id].top;

以上命令适用于与Debian相关的操作系统。请检查CentOS的安装内容

答案 1 :(得分:0)

您必须安装数学依赖项

  

sudo apt-get install libatlas-base-dev liblapack-dev