Skip to content

Instantly share code, notes, and snippets.

@minons1
Created December 18, 2024 03:38
Show Gist options
  • Save minons1/dc37e042939c8c60689af86fdb4b580f to your computer and use it in GitHub Desktop.
Save minons1/dc37e042939c8c60689af86fdb4b580f to your computer and use it in GitHub Desktop.
FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config' on installing librosa

Machine Configuration

  • MacOS Sequoia 15.1.1
  • python 3.11.9 installed via pyenv
  • python venv virtual environment
  • poetry package manager

Installation process

poetry add librosa

Throws this error

(venv) salim@machine project % poetry add librosa
Using version ^0.10.2.post1 for librosa

Updating dependencies
Resolving dependencies... (0.7s)

Package operations: 17 installs, 1 update, 0 removals

  - Installing pycparser (2.22)
  - Installing cffi (1.17.1)
  - Installing joblib (1.4.2)
  - Installing llvmlite (0.34.0): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel
  
  running bdist_wheel
  /var/folders/6f/ps_xlf4d749_qbzk_4qx9g3m0000gn/T/tmp0ec86cd0/.venv/bin/python /private/var/folders/6f/ps_xlf4d749_qbzk_4qx9g3m0000gn/T/tmpn8w9jcqx/llvmlite-0.34.0/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/private/var/folders/6f/ps_xlf4d749_qbzk_4qx9g3m0000gn/T/tmpn8w9jcqx/llvmlite-0.34.0/ffi/build.py", line 105, in main_posix
      out = subprocess.check_output([llvm_config, '--version'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/salim/.pyenv/versions/3.11.9/lib/python3.11/subprocess.py", line 466, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/salim/.pyenv/versions/3.11.9/lib/python3.11/subprocess.py", line 548, in run
      with Popen(*popenargs, **kwargs) as process:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/salim/.pyenv/versions/3.11.9/lib/python3.11/subprocess.py", line 1026, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "/Users/salim/.pyenv/versions/3.11.9/lib/python3.11/subprocess.py", line 1955, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)
  FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

Debugging

  1. run pip wheel --no-cache-dir --use-pep517 "llvmlite (==0.34.0)" to validate it is actually failed
  2. librosa --[depends on]--> numba --[depends on] --> llvmlite --[depends on] --> numpy >=1.22, <2.1
  3. Downgrading numpy to v2.0.2 solve the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment