这个问题我已经有好几个小时了,但还是解决不了。我几乎什么都试过了。
我尝试使用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注:这是上述软件包的一个问题,而不是pip。提示:有关故障的输出,请参阅上文。
发布于 2022-09-11 19:56:38
如果您使用的是基于unix的系统,请尝试从系统包管理器或应用程序商店安装aubio / python-aubio包。
Arch:sudo pamac -Syu aubio
Ubuntu:sudo apt-get install aubio
注意:这将在全球范围内安装aubio。由于您不能直接使用pip安装aubio,因此我建议创建一个virtualenv来克隆您的系统包。只需运行:python -m venv venv_name --system-site-packages
https://stackoverflow.com/questions/71353246
复制相似问题