程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

安装llvmlite报错解决:RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for

发布于2019-08-07 12:55     阅读(7388)     评论(0)     点赞(5)     收藏(1)


晚上在安装llvmlite时报错:

zhang@debian:~$ pip3 install llvmlite==0.16.0
Collecting llvmlite==0.16.0
  Using cached https://files.pythonhosted.org/packages/23/c7/56d7c18564783f33206b3cb6ce861a8d681e8be1a124c5651145ce5aad0f/llvmlite-0.16.0.tar.gz
Building wheels for collected packages: llvmlite
  Running setup.py bdist_wheel for llvmlite ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-s7dyuobp/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpsklqjxv1pip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  got version from file /tmp/pip-build-s7dyuobp/llvmlite/llvmlite/_version.py {'version': '0.16.0', 'full': '964cf1d6d725b000c769379a5efe11932fcfc551'}
  running build_ext
  /usr/bin/python3 /tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 105, in main_posix
      out = subprocess.check_output([llvm_config, '--version'])
    File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
      **kwargs).stdout
    File "/usr/lib/python3.5/subprocess.py", line 383, in run
      with Popen(*popenargs, **kwargs) as process:
    File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
      restore_signals, start_new_session)
    File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
      raise child_exception_type(errno_num, err_msg)
  FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 152, in <module>
      main()
    File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 142, in main
      main_posix('linux', '.so')
    File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 108, in main_posix
      "to the path for llvm-config" % (llvm_config,))
  RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
  error: command '/usr/bin/python3' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite
  Running setup.py install for llvmlite ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-s7dyuobp/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-k5q48i8w-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    got version from file /tmp/pip-build-s7dyuobp/llvmlite/llvmlite/_version.py {'version': '0.16.0', 'full': '964cf1d6d725b000c769379a5efe11932fcfc551'}
    running build_ext
    /usr/bin/python3 /tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 105, in main_posix
        out = subprocess.check_output([llvm_config, '--version'])
      File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
        **kwargs).stdout
      File "/usr/lib/python3.5/subprocess.py", line 383, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.5/subprocess.py", line 1282, in _execute_child
        raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 152, in <module>
        main()
      File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 142, in main
        main_posix('linux', '.so')
      File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 108, in main_posix
        "to the path for llvm-config" % (llvm_config,))
    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/usr/bin/python3' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-s7dyuobp/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-k5q48i8w-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-s7dyuobp/llvmlite/

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76

这个报错是因为找不到llvm-config这个命令:

alias llvm-config="llvm-config-3.9"
export LLVM_CONFIG="/usr/bin/llvm-config-3.9"
  • 1
  • 2

然后再安装就不会报错了:

zhang@debian:~$ pip3 install llvmlite==0.16.0
Collecting llvmlite==0.16.0
  Using cached https://files.pythonhosted.org/packages/23/c7/56d7c18564783f33206b3cb6ce861a8d681e8be1a124c5651145ce5aad0f/llvmlite-0.16.0.tar.gz
Building wheels for collected packages: llvmlite
  Running setup.py bdist_wheel for llvmlite ... done
  Stored in directory: /home/zhang/.cache/pip/wheels/2a/c0/a5/f0d4dc24ba9076d15b0797f84e3fc3e9a6280b56c111f0d6a2
Successfully built llvmlite
Installing collected packages: llvmlite
Successfully installed llvmlite-0.16.0

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10


所属网站分类: 技术文章 > 博客

作者:dkjf787

链接:https://www.pythonheidong.com/blog/article/11063/a7365bf60877670033fd/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

5 0
收藏该文
已收藏

评论内容:(最多支持255个字符)