Numba运行时链接错误

时间:2015-07-04 01:57:34

标签: python python-3.x numba

我正在尝试导入numba。我使用此处的说明(https://github.com/numba/numba#custom-python-environments)安装了llvmlite和numba但是在导入numba时出现以下错误。

Traceback (most recent call last):
  File "kayhan.py", line 6, in <module>
    from numba import *
  File "/usr/local/lib/python3.4/dist-packages/numba/__init__.py", line 7, in <module>
    from . import testing, decorators
  File "/usr/local/lib/python3.4/dist-packages/numba/testing.py", line 6, in <module>
    from numba import config
  File "/usr/local/lib/python3.4/dist-packages/numba/config.py", line 9, in <module>
    import llvmlite.binding as ll
  File "/usr/local/lib/python3.4/dist-packages/llvmlite/binding/__init__.py", line 6, in <module>
    from .dylib import *
  File "/usr/local/lib/python3.4/dist-packages/llvmlite/binding/dylib.py", line 4, in <module>
    from . import ffi
  File "/usr/local/lib/python3.4/dist-packages/llvmlite/binding/ffi.py", line 36, in <module>
    lib = ctypes.CDLL(os.path.join(_lib_dir, get_library_name()))
  File "/usr/lib/python3.4/ctypes/__init__.py", line 351, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/python3.4/dist-packages/llvmlite/binding/libllvmlite.so: undefined symbol:     _ZNSt14error_categoryC2Ev

1 个答案:

答案 0 :(得分:1)

我在Ubuntu 14.04上遇到过与llvm 3.6类似的问题。尝试:

apt-get install gcc-4.8 g++-4.8 libedit-dev llvm-3.6-dev
LLVM_CONFIG=/usr/lib/llvm-3.6/bin/llvm-config CC=/usr/bin/gcc-4.8 CXX=/usr/bin/g++-4.8 pip install numba