novoic / surfboard

Novoic's audio feature extraction library
https://novoic.com
GNU General Public License v3.0
431 stars 47 forks source link

Error during the installation - Failed building wheel for llvmlite #30

Open snevyazh opened 1 year ago

snevyazh commented 1 year ago

Hi! The installation fails with error "Failed building wheel for llvmlite"

` error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. Building wheel for llvmlite (setup.py) ... error ERROR: Failed building wheel for llvmlite Running setup.py clean for llvmlite Successfully built audioread future Failed to build llvmlite Installing collected packages: pytz, llvmlite, urllib3, tqdm, tomli, threadpoolctl, six, setuptools, pyyaml, pycparser, pluggy, platformdirs, packaging, numpy, joblib, iniconfig, idna, future, exceptiongroup, decorator, Cython, charset-normalizer, certifi, audioread, attrs, scipy, requests, python-dateutil, pytest, numba, cffi, SoundFile, scikit-learn, resampy, pysptk, pyloudnorm, pooch, PeakUtils, pandas, librosa, surfboard error: subprocess-exited-with-error

× Running setup.py install for llvmlite did not run successfully. │ exit code: 1 ╰─> See above for output.

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

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

I tried the installation with pip install surfboard --ignore-installed but that doesn't help. I tried to uninstall llvmlite and run pip install surfboard doesn't work either.

I'm doing it on Google Colab which is: NAME="Ubuntu" VERSION="20.04.5 LTS (Focal Fossa)"

thanks for looking into it.

mafaves commented 1 week ago

Hello,

I encountered similar issues when trying to install the llvmlite version specified by Surfboard (<0.32.0,>=0.31.0dev0) on my Windows system. The installation process failed during the building of llvmlite 0.31.0 from source.

This is what worked for me:

First, I cloned the Surfboard repository using:

git clone https://github.com/novoic/surfboard.git

I examined the files and change:

  1. config.yml: I changed version of python from 3.7.6 to my current version
  2. setup.py: I changed "numba==0.48.0" to "numba>=0.48.0" and I add "llvmlite>=0.36.0" in the install_requires list.

Then, I found another problem as the current version of librosa (0.10.2), some of the internal functions, such as librosa.feature.mfcc() and librosa.feature.rms(), require arguments to be passed explicitly as keyword arguments, whereas Surfboard was passing them as positional arguments. Instead of modifying all instances where librosa is used, I decided to downgrade librosa to version 0.9.2, which maintains backward compatibility with the current Surfboard codebase.

System Information: Operating System: Windows 11 (Version 23H2) Python Version: 3.9.18 (Anaconda) Numba Version: 0.6.0 llvmlite Version: 0.43.0 CMake Version: 3.26.4 Visual Studio: Visual Studio 2015 (Build Tools installed) Pip Version: 23.3.1