I've had this problem for hours, and still can't fix it. I've tried almost everything.
I've tried using both python 3.10 and 3.8 and here is the error I usually get:
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
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.
if you are using a unix based system try installing the
aubio
/python-aubio
package from your system package manager or app store.Arch:
sudo pamac -Syu aubio
Ubuntu:
sudo apt-get install aubio
Note: this will install aubio globally. Since you can't install
aubio
directly with pip, I suggest as a workaround creating a virtualenv cloning your system packages. Just run:python -m venv venv_name --system-site-packages