无法在Fedora 21系统上安装python numba依赖llvmlite

时间:2015-03-24 17:26:06

标签: python numba

我正在尝试在运行Fedora 21的PC上安装python numba。我正在运行Python 2.7.8。

我在Getting python Numba working on Ubuntu 14.10 or Fedora 21 with python 2.7找到了一些有用的信息,并尝试了那里的建议,但在我的案例中没有用。该特定查询的建议是

yum install zlib zlib-devel libstdc++-devel libstdc++ libstdc++-static llvm-3.5.0 llvm-devel-3.5.0 libedit libedit-devel
pip install enum34
pip install funcsigs
LLVM_CONFIG=/usr/bin/llvm-config pip install llvmlite
LLVM_CONFIG=/usr/bin/llvm-config pip install numba

问题发生在(上面的步骤4)llvmlite的安装期间。 以下是我在运行pip install llmvlite

时在终端窗口中看到的一些消息
Downloading/unpacking llvmlite
Downloading llvmlite-0.2.2.tar.gz (75kB): 75kB downloaded
Running setup.py (path:/tmp/pip-build-1eUon1/llvmlite/setup.py) egg_info for package llvmlite

Installing collected packages: llvmlite
Running setup.py install for llvmlite
got version from file /tmp/pip-build-1eUon1/llvmlite/llvmlite/_version.py {'version': '0.2.2', 'full': 'c6e72f55cb10bccdcba2f31e9d52c528b12c5a0e'}
/usr/bin/python /tmp/pip-build-1eUon1/llvmlite/ffi/build.py
LLVM version... 3.5.0
# static-libstdc++ avoids runtime dependencies on a
# particular libstdc++ version.
g++ -static-libstdc++ -shared -flto `/usr/bin/llvm-config --cxxflags` -fno-rtti assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp -o libllvmlite.so -flto `/usr/bin/llvm-config --ldflags` -Wl,--exclude-libs=ALL `/usr/bin/llvm-config --system-libs --libs all`
/bin/ld: cannot find -lLLVMLineEditor
/bin/ld: cannot find -lLLVMInstrumentation
/bin/ld: cannot find -lLLVMProfileData
/bin/ld: cannot find -lLLVMIRReader
/bin/ld: cannot find -lLLVMAsmParser
/bin/ld: cannot find -lLLVMDebugInfo
/bin/ld: cannot find -lLLVMOption
/bin/ld: cannot find -lLLVMJIT

等...(未包含无法找到消息的完整列表)

collect2: error: ld returned 1 exit status

Makefile.linux:17: recipe for target 'libllvmlite.so' failed

make: *** [libllvmlite.so] Error 1

Traceback (most recent call last):

  File "/tmp/pip-build-mmSawV/llvmlite/ffi/build.py", line 112, in <module>

    main()

  File "/tmp/pip-build-mmSawV/llvmlite/ffi/build.py", line 104, in main

    main_posix('linux', '.so')

  File "/tmp/pip-build-mmSawV/llvmlite/ffi/build.py", line 96, in main_posix

    subprocess.check_call(['make', '-f', makefile])

  File "/usr/lib64/python2.7/subprocess.py", line 540, in check_call

    raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.linux']' returned non-zero exit status 2

error: command '/usr/bin/python' failed with exit status 1

任何帮助都将不胜感激。

谢谢。

此致

威尔

1 个答案:

答案 0 :(得分:2)

修复了在Fedora 21上编译llvmlite的问题。首先需要安装LLVM的静态库(在yum中使用llvm-static软件包)。这将在/ usr / lib64 / llvm中安装LLVMLineEditor等库。