llvmlite: Error installing llvmlite 0.34.0: FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config': 'llvm-config'
I get this error installing llvmlite 0.34.0 in an AWS Linux AMI with python 3.6.
I understand the error but with version 0.33.0 this worked fine.
Complete output from command /usr/local/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1x7b09lx/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/pip-wheel-14oz5zcs --python-tag cp36:
running bdist_wheel
/usr/local/bin/python3.6 /tmp/pip-install-1x7b09lx/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-install-1x7b09lx/llvmlite/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/usr/local/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/local/lib/python3.6/subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config': 'llvm-config'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-install-1x7b09lx/llvmlite/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-install-1x7b09lx/llvmlite/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-install-1x7b09lx/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/local/bin/python3.6' failed with exit status 1
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 27
- Comments: 35 (16 by maintainers)
@LePoulpeOrange thanks for following up, it does indeed appear as though
pipis unable to find the correct binary wheel from PyPi. Looking at thepiprelease notes for 19.0:https://pip.pypa.io/en/stable/news/#id315
It appears that
manylinux2010support may not be available for the version ofpip(18.1) that you are reporting. Would it be possible to upgrade the version ofpipand try again?I came across similar problem, and now put my solution. My environment is, ubuntu 16, python3.5, pip-18.0.
First, install llvm-8
sudo apt install llvm-8-devThen, relink ‘llvm-config’
sudo ln -s /usr/bin/llvm-config-8 /usr/bin/llvm-configFinally, use pip install numba
pip install numba --userand, succeed.
Please check your version of ‘llvm-config’
llvm-config --version8.0.0 (this is mine)The error you are getting is because pip cannot find a wheel of llvmlite for Python 3.9 and is trying to build llvmlite from source, which fails because LLVM cannot be found.
Jumping up a level, if you are trying to install Numba (and therefore llvmlite) into a Python 3.9 environment, you should be aware that Python 3.9 is not supported yet: https://github.com/numba/numba/issues/6345
Once Numba adds support for Python 3.9, a llvmlite wheel for Python 3.9 will also be posted at the same time, which should fix the issue you are seeing. In the meantime, you’ll have to stick with Python 3.8.
Hello guys,
We are facing a similar issue, that happen when we try to install Fastparquet package from PyPi (which has as dependencies numba).
The pip install command failed with the same output :
Hi, I’m getting the error described above but with
pip 20.2.4. Any suggestions? Thanks!WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with ‘-m pip’ instead of running pip directly. Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Processing /home/pi/.cache/pip/wheels/dc/1c/6e/884fbc03f29fac1dd95a12ed0127fb286d1a9db355df15f49a/numba-0.53.1-cp37-cp37m-linux_aarch64.whl Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from numba) (56.0.0) Requirement already satisfied: numpy>=1.15 in /home/pi/.local/lib/python3.7/site-packages (from numba) (1.20.1) Collecting llvmlite<0.37,>=0.36.0rc1 Using cached llvmlite-0.36.0.tar.gz (126 kB) Building wheels for collected packages: llvmlite 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-6c1se5xw/llvmlite/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-6c1se5xw/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/pip-wheel-n72_k7q3 cwd: /tmp/pip-install-6c1se5xw/llvmlite/ Complete output (11 lines): running bdist_wheel /usr/bin/python3 /tmp/pip-install-6c1se5xw/llvmlite/ffi/build.py LLVM version… Traceback (most recent call last): File “/tmp/pip-install-6c1se5xw/llvmlite/ffi/build.py”, line 220, in <module> main() File “/tmp/pip-install-6c1se5xw/llvmlite/ffi/build.py”, line 210, in main main_posix(‘linux’, ‘.so’) File “/tmp/pip-install-6c1se5xw/llvmlite/ffi/build.py”, line 134, in main_posix raise RuntimeError(msg) from None RuntimeError: Could not find a
llvm-configbinary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help. error: command ‘/usr/bin/python3’ failed with exit status 1ERROR: Failed building wheel for llvmlite Running setup.py clean for llvmlite Failed to build llvmlite DEPRECATION: Could not build wheels for llvmlite which do not use PEP 517. pip will fall back to legacy ‘setup.py install’ for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368. Installing collected packages: llvmlite, numba Running setup.py install for llvmlite … 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-6c1se5xw/llvmlite/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-6c1se5xw/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-record-yvoeepcv/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pi/.local/include/python3.7m/llvmlite cwd: /tmp/pip-install-6c1se5xw/llvmlite/ Complete output (14 lines): running install running build got version from file /tmp/pip-install-6c1se5xw/llvmlite/llvmlite/_version.py {‘version’: ‘0.36.0’, ‘full’: ‘e6bb8d137d922bec8beeb01a237254778759becd’} running build_ext /usr/bin/python3 /tmp/pip-install-6c1se5xw/llvmlite/ffi/build.py LLVM version… Traceback (most recent call last): File “/tmp/pip-install-6c1se5xw/llvmlite/ffi/build.py”, line 220, in <module> main() File “/tmp/pip-install-6c1se5xw/llvmlite/ffi/build.py”, line 210, in main main_posix(‘linux’, ‘.so’) File “/tmp/pip-install-6c1se5xw/llvmlite/ffi/build.py”, line 134, in main_posix raise RuntimeError(msg) from None RuntimeError: Could not find a
llvm-configbinary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help. error: command ‘/usr/bin/python3’ failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '”‘"’/tmp/pip-install-6c1se5xw/llvmlite/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-6c1se5xw/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-record-yvoeepcv/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pi/.local/include/python3.7m/llvmlite Check the logs for full command output. WARNING: You are using pip version 20.2.2; however, version 21.0.1 is available. You should consider upgrading via the ‘/usr/bin/python3 -m pip install --upgrade pip’ command.@esc here the complete output of pip install fastparquet:
I’m inside a container OpenJDK (8u265-slim-buster): Linux 0ea100a9f3fc 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 GNU/Linux
Pip version : pip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7)
@jonsnowseven thanks for following up. I will close this issue as I believe it has been resolved. Thank you for using Numba!
@jonsnowseven excellent! Good luck and do let us know how it goes.
@jonsnowseven yes, current estimates are that it should work with any
pipversion beyond19.0. If it doesn’t appear to work with20.1.1please submit the full log output from thepip install ...command, thank you!