![](/img/trans.png)
[英]Unable to install openfst python library on Mac OS X Yosemite
[英]Python, unable to install package, Mac OS X
我想為Python安裝以下軟件包: http : //www.daimi.au.dk/~mailund/suffix_tree/我已經下載了存檔,解壓縮並在終端中運行以下命令:
python /Users/USRName/Documents/suffix_tree-2.1/setup.py install
執行時,會發生以下錯誤
running install
running build
running build_py
file suffix_tree.py (for module suffix_tree) not found
file suffix_tree.py (for module suffix_tree) not found
running build_ext
building '_suffix_tree' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c python_bindings.c -o build/temp.macosx-10.6-intel-2.7/python_bindings.o
i686-apple-darwin11-gcc-4.2.1: python_bindings.c: No such file or directory
i686-apple-darwin11-gcc-4.2.1: no input files
i686-apple-darwin11-gcc-4.2.1: python_bindings.c: No such file or directory
i686-apple-darwin11-gcc-4.2.1: no input files
lipo: can't figure out the architecture type of: /var/folders/z0/6_4y_75s4dxf7fkndh7rrc6r0000gn/T//ccbGRVor.out
錯誤:命令'gcc-4.2'失敗,退出狀態為1
你會這么善意地建議我,如何解決它?
從錯誤消息中可以清楚地看到,您嘗試編譯文件python-bindings.c
,但該文件在當前目錄中不存在,可能是因為您正在從其他位置運行setup.py
腳本。
所以你應該首先cd /Users/USRName/Documents/suffix_tree-2.1/
然后運行python setup.py
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.