首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装librosa

无法安装librosa
EN

Stack Overflow用户
提问于 2021-04-30 09:18:49
回答 1查看 5.2K关注 0票数 2

我无法在Ubuntu18.04中安装librosa。我尝试过以下命令,所有命令都失败了。

代码语言:javascript
复制
pip install librosa 
python3.8 -m pip install librosa
sudo pip install librosa
pip install -u librosa

下面的错误是我正在得到的:

代码语言:javascript
复制
Failed cleaning build dir for numba
  Running setup.py bdist_wheel for resampy ... done
  Stored in directory: /home/nageshas/.cache/pip/wheels/fa/c1/56/e0e12c6f7f3d2cdea9712b35136a2d40a7817c6210ec096485
  Running setup.py bdist_wheel for llvmlite ... error
  Complete output from command /usr/bin/python3.8 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zrky3kzn/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/tmphpnrxd05pip-wheel- --python-tag cp38:
  running bdist_wheel
  /usr/bin/python3.8 /tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 220, in <module>
      main()
    File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 210, in main
      main_posix('linux', '.so')
    File "/tmp/pip-build-zrky3kzn/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/python3.8' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Successfully built librosa audioread resampy
Failed to build numba llvmlite
Installing collected packages: audioread, decorator, joblib, llvmlite, numpy, setuptools, numba, chardet, urllib3, idna, certifi, requests, pyparsing, packaging, appdirs, pooch, scipy, six, resampy, threadpoolctl, scikit-learn, pycparser, cffi, soundfile, librosa
  Running setup.py install for llvmlite ... error
    Complete output from command /usr/bin/python3.8 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zrky3kzn/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-f20fjedr-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    got version from file /tmp/pip-build-zrky3kzn/llvmlite/llvmlite/_version.py {'version': '0.36.0', 'full': 'e6bb8d137d922bec8beeb01a237254778759becd'}
    running build_ext
    /usr/bin/python3.8 /tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 220, in <module>
        main()
      File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 210, in main
        main_posix('linux', '.so')
      File "/tmp/pip-build-zrky3kzn/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/python3.8' failed with exit status 1
EN

回答 1

Stack Overflow用户

发布于 2021-05-14 07:33:28

我也遇到过同样的问题。

有几个步骤对我有帮助,但我不能定义确切的步骤。因此,我将列出所有:

首先更新setuptools和python3 -m pip install --upgrade pip setuptools wheel

二次python setup.py bdist_wheel

pip install librosa==0.7.2

  1. 尝试安装librosa以前的版本

我希望前两步会有所帮助。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67331302

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档