在安装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