繁体   English   中英

无法为 python 安装 aubio 库,

[英]Can't install aubio library for python,

我已经有这个问题好几个小时了,但仍然没有解决,几乎尝试了一切尝试 python 3.10 和 3.8,这是我通常得到的错误:

Collecting aubio
  Downloading aubio-0.4.9.tar.gz (479 kB)
     ---------------------------------------- 479.0/479.0 KB 652.0 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy in c:\users\admin\appdata\local\programs\python\python310\lib\site-packages (from aubio) (1.21.4)
Using legacy 'setup.py install' for aubio, since package 'wheel' is not installed.
WARNING: Ignoring invalid distribution -pencv-contrib-python (c:\users\admin\appdata\local\programs\python\python310\lib\site-packages)
Installing collected packages: aubio
  Running setup.py install for aubio ... error
  error: subprocess-exited-with-error

  × Running setup.py install for aubio did not run successfully.
  │ exit code: 1
  ╰─> [32 lines of output]
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      creating build\lib.win-amd64-3.10\aubio
      copying python\lib\aubio\cmd.py -> build\lib.win-amd64-3.10\aubio
      copying python\lib\aubio\cut.py -> build\lib.win-amd64-3.10\aubio
      copying python\lib\aubio\midiconv.py -> build\lib.win-amd64-3.10\aubio
      copying python\lib\aubio\slicing.py -> build\lib.win-amd64-3.10\aubio
      copying python\lib\aubio\__init__.py -> build\lib.win-amd64-3.10\aubio
      running build_ext
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      checking for aubio = 0.4.9
      Running "pkg-config --libs --cflags aubio = 0.4.9" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
      Info: aubio 0.4.9 was not found by pkg-config
      Info: looking for *optional* additional packages
      checking for libavcodec
      Running "pkg-config --libs --cflags libavcodec" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
      checking for libavformat
      Running "pkg-config --libs --cflags libavformat" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
      checking for libavutil
      Running "pkg-config --libs --cflags libavutil" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
      checking for libswresample
      Running "pkg-config --libs --cflags libswresample" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
      checking for libavresample
      Running "pkg-config --libs --cflags libavresample" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
      checking for sndfile
      Running "pkg-config --libs --cflags sndfile" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
      checking for samplerate
      Running "pkg-config --libs --cflags samplerate" failed: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
      Info: libaubio was not installed or built locally with waf, adding src/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> aubio

注意:这是上面提到的 package 的问题,而不是 pip 的问题。 提示:见上述 output 的故障。

如果您使用的是基于 unix 的系统,请尝试从系统 package 管理器或应用商店安装aubio / python-aubio package。

拱门: sudo pamac -Syu aubio

Ubuntu: sudo apt-get install aubio

注意:这将全局安装 aubio。 由于您无法使用aubio直接安装 aubio,因此我建议作为一种解决方法,创建一个虚拟环境来克隆您的系统包。 只需运行: python -m venv venv_name --system-site-packages

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM