question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install fails on llvmlite while installing Librosa in MacOS BigSur

See original GitHub issue

llvmlite is showing error while installing librosa. I am using MacOS BigSur and the latest version of pip. The exact error is pasted below -

Running setup.py install for llvmlite ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/setup.py'"'"'; __file__='"'"'/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-record-qqe38zm7/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/llvmlite
         cwd: /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/
    Complete output (29 lines):
    running install
    running build
    got version from file /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
    running build_ext
    /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/ffi/build.py", line 105, in main_posix
        out = subprocess.check_output([llvm_config, '--version'])
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 420, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 501, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 947, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1819, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    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 "/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/ffi/build.py", line 191, in <module>
        main()
      File "/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/ffi/build.py", line 185, in main
        main_posix('osx', '.dylib')
      File "/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/ffi/build.py", line 107, in main_posix
        raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/setup.py'"'"'; __file__='"'"'/private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-install-jz4vwh7l/llvmlite_7b78f3eaa3f44d6bb0fcc7816cc1635b/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/tq/7h23qgpn7pvcgr4thxpwxjph0000gn/T/pip-record-qqe38zm7/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/llvmlite Check the logs for full command output.

To Reproduce

pip install librosa

Expected behavior Expected librosa to install but it is showing error while installing llvmlite

Software versions*

macOS-10.16-x86_64-i386-64bit
Python 3.9.0 (v3.9.0:9cf6752276, Oct  5 2020, 11:29:23) 
[Clang 6.0 (clang-600.0.57)]
NumPy 1.19.4
SciPy 1.5.4

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
musicnerdcommented, Jan 12, 2021

I’m sorry developers, but I don’t think it’s acceptable to build your software with multiple dependencies, but then when those dependencies can’t install (and therefore people can’t use/access your software without significant headache) you simply wipe your hands and say “not our problem”?? Either remove the dependencies or work with those teams to fix the issue. Having to compile a dependency package from source is unacceptable for beginners. For the record, I had no problem installing on MacOS (Mojave), but can’t install on Windows10 due to same issue as OP.

2reactions
stuartarchibaldcommented, Jan 12, 2021

For the future, librosa depends on numba which depends on llvmlite (which encapsulates the LLVM compiler).

From a Numba point of view, Python 3.9 support turned out to be somewhat challenging, some of the details are here: https://github.com/numba/numba/issues/6345#issuecomment-738696458, it took a while to figure everything out. Good news is that some development packages should ship soon (PR https://github.com/numba/numba/pull/6579 has just been approved, llvmlite PR was approved a while back https://github.com/numba/llvmlite/pull/671). Thanks for your understanding and patience.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not able to install librosa - Stack Overflow
First, update setuptools and wheel python3 -m pip install ... Try to install the previous version of librosa pip install librosa==0.7.2.
Read more >
encountered error while trying to install package. ╰─> llvmlite
pip install librosa --ignore-installed llvmlite ... **Note**: I cannot add `tensorflow-macos` to the project as it has to be cross-platform.
Read more >
Installation instructions — librosa 0.10.0.dev0 documentation
The simplest way to install librosa is through the Python Package Index (PyPI). ... Note that conda users on Linux and OSX will...
Read more >
Installation — llvmlite 0.40.0dev0-48-ged0f625-dirty ...
conda install -c numba/label/dev llvmlite. Binary wheels are also available for installation from PyPI: pip install llvmlite.
Read more >
llvm version 11 and librosa error - Raspberry Pi Stack Exchange
Try pointing LLVM to the installation: LLVM_CONFIG=/user/bin/llvm-config pip3 install llvmlite==0.37.0. You might need to run it with sudo ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found