Question

I've been following this guide. Unfortunately I don't think llvmpy is being installed properly (here is the output from python).

>>> 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

Doing python -c "import llvm" gives me the same error as above ("No module named _capsule"). Any ideas? I am not getting errors while installing llvm,llvmpy or numba, but it is pretty clear that llvmpy isn't getting installed properly

Was it helpful?

Solution

I forgot to answer this. I solved the problem as the underlying issue was an Apple-release (see this answer to a similar'ish question).

TLDR:

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

And then follow the guide given here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top