2013-05-21 34 views
0

我是編程的總noob,所以請裸機!我爲我的研究做了一些圖像分析,涉及使用CellTool(http://pantheon.yale.edu/~zp2/Celltool/),Python和numpy。我在OS X 10.8.3上。在我的舊筆記本電腦崩潰了,我能夠很好地運行我的命令,但我得到了一個新的,並且事情並不順利!初學者,python有關site-packages/celltool/numerics/fitpack/_fitpack.so的錯誤

相信我有CellTool和numpy安裝正確,我只是使用Python 2.7.2這是Mac上的標準。但是,當我嘗試運行此python腳本「calculate_distances.py」命令,我得到這個錯誤:

Yuxins-MacBook-Pro:Modified_Contours yuxinsun$ python calculate_distances.py 
Traceback (most recent call last): 
    File "calculate_distances.py", line 24, in <module> 
    normals = contours[n-1].inward_normals() 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/contour/contour_class.py", line 384, in inward_normals 
    import celltool.numerics.fitpack as fitpack 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/numerics/fitpack/__init__.py", line 1, in <module> 
    from fitpack import * 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/numerics/fitpack/fitpack.py", line 34, in <module> 
    import _fitpack 
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/numerics/fitpack/_fitpack.so, 2): Library not loaded: /usr/local/lib/libgfortran.2.dylib 
    Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/celltool/numerics/fitpack/_fitpack.so 
    Reason: image not found 

而且我不知道任何的意思......我只需要運行這個python腳本和得到它吐出的文件。

我只是想念「fitpack」無論是什麼?如果是這樣,我該如何安裝它?或者我能做些什麼來解決這個問題。

謝謝你的幫助!

+1

看起來你的fitpack安裝有些問題。 – PSS

回答

0

你需要確保每安裝要求你有這些安裝:

If one of the above binary installers did not suit your needs, 
please install Celltool from the source code. 
This depends on only three things: 

1.Python (version 2.3 or later). 
2. NumPy 1.0.4 or later. 
3. Working C/C++ and Fortran compilers. 

,它看起來像沒有安裝到您的Fortran編譯庫。

這可能會幫助你:https://scicomp.stackexchange.com/questions/2469/how-should-i-install-a-fortran-compiler-on-a-mac-os-x-10-x-x-4

+0

感謝您的回答!我安裝了xcode,但我不確定該如何處理它,或者它足夠了? – yxnsn

+0

哦,我明白了!我安裝了gfortran。謝謝! – yxnsn

+0

歡迎您:) – PSS