Mycroft Community Forum

Error while installing librosa

I tried to install librosa like this:
mycroft-pip install librosa

This is the error returned:

Building wheel for llvmlite (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /home/alon/Desktop/mycroft-core/.venv/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-yqitk4xd/llvmlite/setup.py’"’"’; file=’"’"’/tmp/pip-install-yqitk4xd/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-aduiolk_
cwd: /tmp/pip-install-yqitk4xd/llvmlite/
Complete output (26 lines):
running bdist_wheel
/home/alon/Desktop/mycroft-core/.venv/bin/python /tmp/pip-install-yqitk4xd/llvmlite/ffi/build.py
LLVM version… Traceback (most recent call last):
File “/tmp/pip-install-yqitk4xd/llvmlite/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-yqitk4xd/llvmlite/ffi/build.py”, line 168, in
main()
File “/tmp/pip-install-yqitk4xd/llvmlite/ffi/build.py”, line 158, in main
main_posix(‘linux’, ‘.so’)
File “/tmp/pip-install-yqitk4xd/llvmlite/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 ‘/home/alon/Desktop/mycroft-core/.venv/bin/python’ failed with exit status 1

ERROR: Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite, numba, resampy, librosa
Running setup.py install for llvmlite … error
ERROR: Command errored out with exit status 1:
command: /home/alon/Desktop/mycroft-core/.venv/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-yqitk4xd/llvmlite/setup.py’"’"’; file=’"’"’/tmp/pip-install-yqitk4xd/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-rrzkqytl/install-record.txt --single-version-externally-managed --compile --install-headers /home/alon/Desktop/mycroft-core/.venv/include/site/python3.5/llvmlite
cwd: /tmp/pip-install-yqitk4xd/llvmlite/
Complete output (29 lines):
running install
running build
got version from file /tmp/pip-install-yqitk4xd/llvmlite/llvmlite/_version.py {‘full’: ‘26059d238f4ba23dff74703dd27168591d889edd’, ‘version’: ‘0.32.0’}
running build_ext
/home/alon/Desktop/mycroft-core/.venv/bin/python /tmp/pip-install-yqitk4xd/llvmlite/ffi/build.py
LLVM version… Traceback (most recent call last):
File “/tmp/pip-install-yqitk4xd/llvmlite/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-yqitk4xd/llvmlite/ffi/build.py", line 168, in <module>
    main()
  File "/tmp/pip-install-yqitk4xd/llvmlite/ffi/build.py", line 158, in main
    main_posix('linux', '.so')
  File "/tmp/pip-install-yqitk4xd/llvmlite/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 '/home/alon/Desktop/mycroft-core/.venv/bin/python' failed with exit status 1
----------------------------------------

ERROR: Command errored out with exit status 1: /home/alon/Desktop/mycroft-core/.venv/bin/python -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-yqitk4xd/llvmlite/setup.py’"’"’; file=’"’"’/tmp/pip-install-yqitk4xd/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-rrzkqytl/install-record.txt --single-version-externally-managed --compile --install-headers /home/alon/Desktop/mycroft-core/.venv/include/site/python3.5/llvmlite Check the logs for full command output.

Do you have the “LLVM” package installed?

More info; llvm.org

I downloaded librosa once before on my computer so I guess it is already downloaded.
Just in case, how do I check?

I don’t know, but the pip package you want to install need the LLVM package which it can’t find I believe.

Or you can try to find a precompiled pip wheel for that package.