我是新來的python安裝,並遇到了一個簡單的腳本試圖讀取一個包的以下問題。找不到Python linalg包?
:> python interptime.py
Traceback (most recent call last):
File "interptime.py", line 3, in <module>
from scipy import interpolate
File "/usr/local/scisoft/packages/python/lib/python2.7/site-packages/scipy/interpolate/__init__.py", line 154, in <module>
from rbf import Rbf
File "/usr/local/scisoft/packages/python/lib/python2.7/site-packages/scipy/interpolate/rbf.py", line 49, in <module>
from scipy import linalg
File "/usr/local/scisoft/packages/python/lib/python2.7/site-packages/scipy/linalg/__init__.py", line 133, in <module>
from basic import *
File "/usr/local/scisoft/packages/python/lib/python2.7/site-packages/scipy/linalg/basic.py", line 14, in <module>
from scipy.linalg import calc_lwork
ImportError: dlopen(/usr/local/scisoft/packages/python/lib/python2.7/site-packages/scipy/linalg/calc_lwork.so, 2): Symbol not found: _ilaenv_
Referenced from: /usr/local/scisoft/packages/python/lib/python2.7/site-packages/scipy/linalg/calc_lwork.so
Expected in: /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
這裏是interptime.py腳本的開頭:
import numpy as np
import matplotlib.pyplot as plt
from scipy import interpolate
...
我怎麼能告訴巨蟒哪裏去尋找SciPy的/ linalg包?
您是否從源建立? – Drewness
我已經安裝了python樹隨附的scisoft軟件包,如錯誤信息中所示,但我確實不確定。 – dr4712
這不是Python的問題。在線性代數庫中,linalg期望的是什麼和你的系統上有什麼不匹配。您安裝了哪個scisoft版本,從哪裏安裝,以及您使用的是哪個Mac OS版本? –