Notice
Recent Posts
Recent Comments
Link
관리 메뉴

박사면뭐해

라즈베리파이4에서 파이썬3 llvmlite 라이브러리 설치 안될 때 오류 해결 (feat. librosa) 본문

카테고리 없음

라즈베리파이4에서 파이썬3 llvmlite 라이브러리 설치 안될 때 오류 해결 (feat. librosa)

박사면뭐해 2021. 5. 19. 17:26

소리 분석을 위해 librosa 라이브러리를 설치하는데, llvmlite 패키지 설치 오류가 발생함

Building wheels for collected packages: llvmlite
  Running setup.py bdist_wheel for llvmlite ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-3hwna_9t/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-kkkw6ueh --python-tag cp37:
  running bdist_wheel
  /usr/bin/python /tmp/pip-install-3hwna_9t/llvmlite/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-install-3hwna_9t/llvmlite/ffi/build.py", line 220, in <module>
      main()
    File "/tmp/pip-install-3hwna_9t/llvmlite/ffi/build.py", line 210, in main
      main_posix('linux', '.so')
    File "/tmp/pip-install-3hwna_9t/llvmlite/ffi/build.py", line 134, in main_posix
      raise RuntimeError(msg) from None
  RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
  error: command '/usr/bin/python' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: pyparsing, packaging, appdirs, pooch, decorator, pycparser, cffi, soundfile, llvmlite, numba, resampy, librosa
  Running setup.py install for llvmlite ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-3hwna_9t/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-2n_ho3k6/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    got version from file /tmp/pip-install-3hwna_9t/llvmlite/llvmlite/_version.py {'version': '0.36.0', 'full': 'e6bb8d137d922bec8beeb01a237254778759becd'}
    running build_ext
    /usr/bin/python /tmp/pip-install-3hwna_9t/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/tmp/pip-install-3hwna_9t/llvmlite/ffi/build.py", line 220, in <module>
        main()
      File "/tmp/pip-install-3hwna_9t/llvmlite/ffi/build.py", line 210, in main
        main_posix('linux', '.so')
      File "/tmp/pip-install-3hwna_9t/llvmlite/ffi/build.py", line 134, in main_posix
        raise RuntimeError(msg) from None
    RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
    error: command '/usr/bin/python' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-3hwna_9t/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-2n_ho3k6/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-3hwna_9t/llvmlite/

여기저기 뒤져봤는데, 해결법을 발견함

sudo apt install llvm-9
LLVM_CONFIG=llvm-config-9 pip install llvmlite

위 명령어를 librosa 설치에 적용해도 됨

LLVM_CONFIG=llvm-config-9 pip install librosa

출처: https://github.com/numba/llvmlite/issues/604

Comments