zhang&#64;debian:~$ pip3 install llvmlite&#61;&#61;0.16.0 Collecting llvmlite&#61;&#61;0.16.0Using cached https://files.pythonhosted.org/packages/23/c7/56d7c18564783f33206b3cb6ce861a8d681e8be1a124c5651145ce5aad0f/llvmlite-0.16.0.tar.gz Building wheels for collected packages: llvmliteRunning setup.py bdist_wheel for llvmlite ... errorComplete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__&#61;&#39;/tmp/pip-build-s7dyuobp/llvmlite/setup.py&#39;;f&#61;getattr(tokenize, &#39;open&#39;, open)(__file__);code&#61;f.read().replace(&#39;\r\n&#39;, &#39;\n&#39;);f.close();exec(compile(code, __file__, &#39;exec&#39;))" bdist_wheel -d /tmp/tmpsklqjxv1pip-wheel---python-tag cp35:running bdist_wheelrunning buildgot version from file /tmp/pip-build-s7dyuobp/llvmlite/llvmlite/_version.py {&#39;version&#39;:&#39;0.16.0&#39;,&#39;full&#39;:&#39;964cf1d6d725b000c769379a5efe11932fcfc551&#39;}running build_ext/usr/bin/python3 /tmp/pip-build-s7dyuobp/llvmlite/ffi/build.pyLLVM version...Traceback(most recent call last):File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 105,in main_posixout &#61; subprocess.check_output([llvm_config,&#39;--version&#39;])File "/usr/lib/python3.5/subprocess.py", line 316,in check_output**kwargs).stdoutFile "/usr/lib/python3.5/subprocess.py", line 383,in runwithPopen(*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_childraise child_exception_type(errno_num, err_msg)FileNotFoundError:[Errno 2] No such file or directory:&#39;llvm-config&#39;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 mainmain_posix(&#39;linux&#39;,&#39;.so&#39;)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-configerror: command &#39;/usr/bin/python3&#39; failed with exit status 1----------------------------------------Failed building wheel for llvmliteRunning setup.py clean for llvmlite Failed to build llvmlite Installing collected packages: llvmliteRunning setup.py install for llvmlite ... errorComplete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__&#61;&#39;/tmp/pip-build-s7dyuobp/llvmlite/setup.py&#39;;f&#61;getattr(tokenize, &#39;open&#39;, open)(__file__);code&#61;f.read().replace(&#39;\r\n&#39;, &#39;\n&#39;);f.close();exec(compile(code, __file__, &#39;exec&#39;))" install --record /tmp/pip-k5q48i8w-record/install-record.txt --single-version-externally-managed --compile --user --prefix&#61;:running installrunning buildgot version from file /tmp/pip-build-s7dyuobp/llvmlite/llvmlite/_version.py {&#39;version&#39;:&#39;0.16.0&#39;,&#39;full&#39;:&#39;964cf1d6d725b000c769379a5efe11932fcfc551&#39;}running build_ext/usr/bin/python3 /tmp/pip-build-s7dyuobp/llvmlite/ffi/build.pyLLVM version...Traceback(most recent call last):File "/tmp/pip-build-s7dyuobp/llvmlite/ffi/build.py", line 105,in main_posixout &#61; subprocess.check_output([llvm_config,&#39;--version&#39;])File "/usr/lib/python3.5/subprocess.py", line 316,in check_output**kwargs).stdoutFile "/usr/lib/python3.5/subprocess.py", line 383,in runwithPopen(*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_childraise child_exception_type(errno_num, err_msg)FileNotFoundError:[Errno 2] No such file or directory:&#39;llvm-config&#39;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 mainmain_posix(&#39;linux&#39;,&#39;.so&#39;)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-configerror: command &#39;/usr/bin/python3&#39; failed with exit status 1---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__&#61;&#39;/tmp/pip-build-s7dyuobp/llvmlite/setup.py&#39;;f&#61;getattr(tokenize,&#39;open&#39;, open)(__file__);code&#61;f.read().replace(&#39;\r\n&#39;,&#39;\n&#39;);f.close();exec(compile(code, __file__,&#39;exec&#39;))" install --record /tmp/pip-k5q48i8w-record/install-record.txt --single-version-externally-managed --compile --user --prefix&#61;" failed with error code 1in/tmp/pip-build-s7dyuobp/llvmlite/
这个报错是因为找不到llvm-config这个命令&#xff1a;
alias llvm-config&#61;"llvm-config-3.9" exportLLVM_CONFIG&#61;"/usr/bin/llvm-config-3.9"
然后再安装就不会报错了&#xff1a;
zhang&#64;debian:~$ pip3 install llvmlite&#61;&#61;0.16.0 Collecting llvmlite&#61;&#61;0.16.0Using cached https://files.pythonhosted.org/packages/23/c7/56d7c18564783f33206b3cb6ce861a8d681e8be1a124c5651145ce5aad0f/llvmlite-0.16.0.tar.gz Building wheels for collected packages: llvmliteRunning setup.py bdist_wheel for llvmlite ... doneStored in directory:/home/zhang/.cache/pip/wheels/2a/c0/a5/f0d4dc24ba9076d15b0797f84e3fc3e9a6280b56c111f0d6a2 Successfully built llvmlite Installing collected packages: llvmlite Successfully installed llvmlite-0.16.0