numba: RPi3: cannot install Numba due to issue with LLVM toolchain
Reporting a bug
system information:
- Raspberry pi 3 Model B
- os is Rapsbian 10 (buster)
- Python 3.7.3
- attempting to install Librosa through pip 20.0.1
- gcc version 8.3.0
Hello,
I’ve been trying to install Librosa on my raspberry pi 3 model B.
the line I used in order to install Librosa was: pip3 install --upgrade --user librosa
after a really long download the installation got into infinite backtracking of the pip resolver trying to solve version conflicts over numba so I decided to run the line: pip3 install --upgrade --user -no--deps librosa instead and it did work and librosa was installed successfully according to pip.
right now when I attempt to import Librosa in the python shell I get the following Traceback:
`pi@raspberrypi:~ $ python3 Python 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] on linux Type “help”, “copyright”, “credits” or “license” for more information.
import librosa Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/home/pi/.local/lib/python3.7/site-packages/librosa/init.py”, line 211, in <module> from . import core File “/home/pi/.local/lib/python3.7/site-packages/librosa/core/init.py”, line 5, in <module> from .convert import * # pylint: disable=wildcard-import File “/home/pi/.local/lib/python3.7/site-packages/librosa/core/convert.py”, line 7, in <module> from . import notation File “/home/pi/.local/lib/python3.7/site-packages/librosa/core/notation.py”, line 8, in <module> from …util.exceptions import ParameterError File “/home/pi/.local/lib/python3.7/site-packages/librosa/util/init.py”, line 83, in <module> from .utils import * # pylint: disable=wildcard-import File “/home/pi/.local/lib/python3.7/site-packages/librosa/util/utils.py”, line 10, in <module> import numba File “/home/pi/.local/lib/python3.7/site-packages/numba/init.py”, line 4, in <module> from numba import module_type_inference File “/home/pi/.local/lib/python3.7/site-packages/numba/module_type_inference.py”, line 8, in <module> from numba import typesystem, symtab File “/home/pi/.local/lib/python3.7/site-packages/numba/typesystem/init.py”, line 6, in <module> from .typemapper import * File “/home/pi/.local/lib/python3.7/site-packages/numba/typesystem/typemapper.py”, line 3, in <module> import llvm.core ModuleNotFoundError: No module named ‘llvm’ `
I’ve tried to run sudo apt-get install llvm and it did install llvm but didn’t solve the issue.
also tried running pip3 instal llvmlite but got the following result:
sudo pip3 install llvmlite Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting llvmlite Could not find a version that satisfies the requirement llvmlite (from versions: ) No matching distribution found for llvmlite
another attempt at installing librosa with pip resulted in this 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-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/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-s9gczj9k
cwd: /tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/
Complete output (15 lines):
running bdist_wheel
/usr/bin/python3 /tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/ffi/build.py
LLVM version... 7.0.1
Traceback (most recent call last):
File "/tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/ffi/build.py", line 143, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '7.0.1'. Be sure to set LLVM_CONFIG to the right executable path.
Read the documentation at http://llvmlite.pydata.org/ for more information about building llvmlite.
error: command '/usr/bin/python3' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: pycparser, llvmlite, numba, cffi, soundfile, resampy, audioread
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-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/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-c8uz7phd/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/pi/.local/include/python3.7m/llvmlite
cwd: /tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/
Complete output (18 lines):
running install
running build
got version from file /tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/llvmlite/_version.py {'version': '0.35.0', 'full': 'ea23b026930cc00824c907172383f54c9d438e6b'}
running build_ext
/usr/bin/python3 /tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/ffi/build.py
LLVM version... 7.0.1
Traceback (most recent call last):
File "/tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/ffi/build.py", line 191, in <module>
main()
File "/tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/ffi/build.py", line 181, in main
main_posix('linux', '.so')
File "/tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/ffi/build.py", line 143, in main_posix
raise RuntimeError(msg)
RuntimeError: Building llvmlite requires LLVM 10.0.x or 9.0.x, got '7.0.1'. Be sure to set LLVM_CONFIG to the right executable path.
Read the documentation at http://llvmlite.pydata.org/ for more information about building llvmlite.
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-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0gw3_ve1/llvmlite_1d4974bee4c74364ac4e473f80edfd7d/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-c8uz7phd/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.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (9 by maintainers)
@COfek thank you for following up and closing this issue. I am glad you managed to get things up and running.
@abebeos Thanks a bunch I will try it tomorrow and update you guys on the situation.