2014-03-25 243 views
2

我一直在關注this指南。不幸的是,我不認爲llvmpy被正確安裝(這裏是python的輸出)。在OSX上安裝llvmpy

>>> import numba 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    File "/Library/Python/2.7/site-packages/numba/__init__.py", line 5, in <module> 
    from . import testing, decorators 
    File "/Library/Python/2.7/site-packages/numba/decorators.py", line 7, in <module> 
    from numba.targets import registry 
    File "/Library/Python/2.7/site-packages/numba/targets/registry.py", line 3, in <module> 
    from numba.targets import cpu 
    File "/Library/Python/2.7/site-packages/numba/targets/cpu.py", line 4, in <module> 
    import llvm.core as lc 
    File "llvm/__init__.py", line 6, in <module> 
    from llvmpy import extra 
    File "llvmpy/extra.py", line 5, in <module> 
    from llvmpy import capsule 
    File "llvmpy/capsule.py", line 4, in <module> 
    from llvmpy._capsule import (unwrap, has_ownership, downcast, wrap, 
ImportError: No module named _capsule 

python -c "import llvm"給了我同樣的錯誤如上( 「無模塊命名_capsule」)。有任何想法嗎?我在安裝llvm,llvmpy或numba時沒有收到錯誤,但很明顯,llvmpy沒有正確安裝。

回答

1

我忘了回答這個問題。我解決了這個問題,因爲潛在的問題是Apple發佈的(請參閱this回答類似的問題)。

TLDR:

export CFLAGS=-Qunused-arguments 
export CPPFLAGS=-Qunused-arguments 

然後按照給出的指導here