2016-03-08 82 views
0

嘗試使用模塊scipy.optimize.slsqp時遇到以下問題。Python 3.5 Scipy優化導入錯誤

>>> 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。任何人都可以解釋這一點嗎?謝謝。

回答

0

您需要安裝SciPy數學依賴關係。

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

上述命令適用於Debian相關的操作系統。請檢查什麼,必須安裝在CentOS

+0

你好,謝謝你的回覆。我使用sudo yum install blas-devel lapack-devel安裝了CentOS的SciPy數學依賴項。不過,我仍然得到相同的錯誤... – user6020400

0

您必須安裝數學依賴

命令和apt-get安裝libatlas基-dev的liblapack-dev的