2014-03-05 86 views
1

我是新來的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包?

+0

您是否從源建立? – Drewness

+0

我已經安裝了python樹隨附的scisoft軟件包,如錯誤信息中所示,但我確實不確定。 – dr4712

+1

這不是Python的問題。在線性代數庫中,linalg期望的是什麼和你的系統上有什麼不匹配。您安裝了哪個scisoft版本,從哪裏安裝,以及您使用的是哪個Mac OS版本? –

回答

-2

Python在PYTHON_PATH環境變量中查找已安裝的軟件包。但我不確定這是否是您的問題。錯誤消息表明共享對象版本存在問題...我建議您在控制檯上安裝pip install命令所需的所有內容...

+0

對不起,沒有。 pip在OS X上安裝scipy不是一個好主意。更好地遵循http://www.scipy.org/install.html上的安裝說明 –

+0

對不起,我不知道提問者有一個Mac OS系統... – flammi88

+0

事實上,我只是猜測(最後一行在OP追蹤)。事實上,即使在* nix上,pip的安裝也會有問題,因爲它並不總是對非python依賴做正確的事情(tm)。例如BLAS/LAPACK(這是---更多的猜測---這裏有個問題) –