【安装torch_geometric时error:llvm-config failed executing, please point LLVM_CONFIG to the path for llv】

在安装torch_geometric时出现error:

Building wheel for llvmlite (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6kn220v_/llvmlite_af90b8d700f9466a8af02244fc165972/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6kn220v_/llvmlite_af90b8d700f9466a8af02244fc165972/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/pip-wheel-5yplboro
       cwd: /tmp/pip-install-6kn220v_/llvmlite_af90b8d700f9466a8af02244fc165972/
  Complete output (26 lines):
  running bdist_wheel
  /usr/bin/python3 /tmp/pip-install-6kn220v_/llvmlite_af90b8d700f9466a8af02244fc165972/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-install-6kn220v_/llvmlite_af90b8d700f9466a8af02244fc165972/ffi/build.py", line 106, in main_posix
      out = subprocess.check_output([llvm_config, '--version'])
    File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
      **kwargs).stdout
    File "/usr/lib/python3.5/subprocess.py", line 693, in run
      with Popen(*popenargs, **kwargs) as process:
    File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
      restore_signals, start_new_session)
    File "/usr/lib/python3.5/subprocess.py", line 1551, 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-install-6kn220v_/llvmlite_af90b8d700f9466a8af02244fc165972/ffi/build.py", line 192, in <module>
      main()
    File "/tmp/pip-install-6kn220v_/llvmlite_af90b8d700f9466a8af02244fc165972/ffi/build.py", line 182, in main
      main_posix('linux', '.so')
    File "/tmp/pip-install-6kn220v_/llvmlite_af90b8d700f9466a8af02244fc165972/ffi/build.py", line 109, 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
  ----------------------------------------
  ERROR: Failed building wheel for llvmlite

网上给出的解决办法:
1.如果你的pip版本较低,则更新pip可以解决问题(可以参考这个
执行:pip3 install --upgrade pip 或者 pip install --upgrade pip
2.我的pip版本已经是较新的版本,因此方法1不适用,
在这个帖子中发现安装最新版本的可以解决问题

sudo pip install llvmlite==0.31.0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值