pi@raspberrypi:~$ pip3 install llvmlite
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting llvmlite
Using cached https://files.pythonhosted.org/packages/71/4e/b1086722f4fa0b52cf8c0d4b2c985fb3f95d2f1be1b010259497b2464c1d/llvmlite-0.33.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-install-sdekp53y/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-ikvvuryb --python-tag cp37:
running bdist_wheel
/usr/bin/python3 /tmp/pip-install-sdekp53y/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-install-sdekp53y/llvmlite/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1522, 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-sdekp53y/llvmlite/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-install-sdekp53y/llvmlite/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-install-sdekp53y/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-install-sdekp53y/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-8zgcbwp0/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
got version from file /tmp/pip-install-sdekp53y/llvmlite/llvmlite/_version.py {'version': '0.33.0', 'full': '76c8ecba36e23fa8b6878505a1afc8a3d7a2c8a1'}
running build_ext
/usr/bin/python3 /tmp/pip-install-sdekp53y/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-install-sdekp53y/llvmlite/ffi/build.py", line 105, in main_posix
out = subprocess.check_output([llvm_config, '--version'])
File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
**kwargs).stdout
File "/usr/lib/python3.7/subprocess.py", line 472, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1522, 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-sdekp53y/llvmlite/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-install-sdekp53y/llvmlite/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-install-sdekp53y/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-install-sdekp53y/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-8zgcbwp0/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-sdekp53y/llvmlite/
pi@raspberrypi:~$
FWIW, on an RPi4 with Raspbian Buster, the following worked for me to install llvmlite:
sudo apt install llvm-9LLVM_CONFIG=llvm-config-9 pip install llvmliteTo solve this issue: I installed LLVM 11 because the llvm was not configured to the right path (“RuntimeError: Building llvmlite requires LLVM 11.x.x, got ‘9.0.1’. Be sure to set LLVM_CONFIG to the right executable path.”) – This is the Error I got.
Solution: 1: sudo apt install llvm-11 2: LLVM_CONFIG=llvm-config-11 pip3 install llvmlite 3: LLVM_CONFIG=llvm-config-11 pip3 install librosa
Result I got: “Successfully installed librosa-0.9.2 llvmlite-0.39.0 numba-0.56.0 resampy-0.3.1”
Hope this helps
Thx @FardowsaRoble, you save my life !
I tried to install conda to install llvmlite but I was missing too many packages.
LLVM_CONFIG=llvm-config-11 pip3 install numbaworks very well !I have the impression that your solution is so simple, that it should necessarily appear in the documentation of Numba.
Anyway thank you very much.
This is the answer i been looking for, Thank you sir or madam!! I’m on RPi 3B+, Buster, Kernel: 5.10.103-v7+, Python -V: 3.7.3
I was trying to install librosa on my RPi 4+ and found the following:
After many paths tried, I finally was able to install on Raspberry Pi 4+. It was necessary, I think, to install LLVM even though llvmlite says not – to do that required ‘sudo apt-get install llvm-9*’ since the default is 7.0 and llvmlite requires 9 or 10. Then, to install llvmlite required adding an environment variable as in ‘LLVM_CONFIG=llvm-config-9 pip3 install llvmlite’ and then ‘LLVM_CONFIG=llvm-config-9 pip3 install librosa’ .