python llvmlite installtion iisue - 未检测到SVML

时间:2018-06-11 10:41:14

标签: python-3.x numba llvmlite

尝试在ubuntu 14.0.4上创建一个拥有numba 0.33.0作为依赖项的python脚本。已安装llvm 6.0并将llvm_config变量设置为llvm_config位置。

在构建llvmlite时遇到问题

以下是堆栈跟踪

安装收集的软件包:llvmlite,numba   运行llvmlite的setup.py安装...错误     从命令/ home / ubuntu / www / Spam_detection_algo / spam / bin / python3 -u -c完成输出“import setuptools,tokenize; file ='/ tmp / pip-install-lca77547 / llvmlite / setup .py'; f = getattr(tokenize,'open',open)( file ); code = f.read()。replace('\ r \ n','\ n'); f.close(); exec(编译(代码,文件,'exec'))“install --record /tmp/pip-record-a53bsnug/install-record.txt --single-version -externally-managed --compile --install-headers /home/ubuntu/www/Spam_detection_algo/spam/include/site/python3.4/llvmlite:     运行安装     运行构建     从文件/tmp/pip-install-lca77547/llvmlite/llvmlite/_version.py获得版本{'完整':'02bd87a8449bb2984e9791bdd1d653338442b6b8','版本':'0.23.2'}

▽     运行build_ext     / home / ubuntu / www / Spam_detection_algo / spam / bin / python3 /tmp/pip-install-lca77547/llvmlite/ffi/bu​​ild.py     LLVM版本...#static-libstdc ++避免了对a的运行时依赖性     #specific libstdc ++版本。     g ++ -shared -I / usr / lib / llvm-6.0 / include -std = c ++ 0x -fuse-ld = gold -Wl, - no-keep-files-mapped -Wl, - no-map-whole -files -fPIC -fvisibility-inlines-hidden -Werror = date-time -std = c ++ 11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers-迂腐-Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O2 -DNDEBUG -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS - fno-rtti -g -flto assembly.cpp bitcode.cpp core.cpp initfini.cpp module.cpp value.cpp executionengine.cpp transforms.cpp passmanagers.cpp targets.cpp dylib.cpp linker.cpp object_file.cpp -o libllvmlite。 so -L / usr / lib / llvm-6.0 / lib -flto -Wl, - exclude-libs = ALL -lLLVM-6.0     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     cc1plus:错误:-Werror = date-time:无选项-Wdate-time     make:*** [libllvmlite.so]错误1     6.0.1

SVML not detected
Traceback (most recent call last):
  File "/tmp/pip-install-lca77547/llvmlite/ffi/build.py", line 153, in <module>
    main()
  File "/tmp/pip-install-lca77547/llvmlite/ffi/build.py", line 143, in main
    main_posix('linux', '.so')
  File "/tmp/pip-install-lca77547/llvmlite/ffi/build.py", line 135, in main_posix
    subprocess.check_call(['make', '-f', makefile])
  File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.linux']' returned non-zero exit status 2
error: command '/home/ubuntu/www/Spam_detection_algo/spam/bin/python3' failed with exit status 1

1 个答案:

答案 0 :(得分:0)

请按照here的说明检查您的LLVM_CONFIG环境变量。

  

如果您的LLVM安装在非标准位置,请设置   LLVM_CONFIG环境变量对应的位置   llvm-config或llvm-config.exe可执行文件。此变量必须持久   进入llvmlite的安装-例如,进入Python   环境。

     

示例:如果LLVM使用llvm-config安装在/ opt / llvm /中   二进制文件位于/ opt / llvm / bin / llvm-config,设置   LLVM_CONFIG = / opt / llvm / bin / llvm-config。