Installing librosa on raspberry pi3

1.3k Views Asked by At

I am currently trying to install librosa and after days trying to figure it out I'm now quite helpless. I have tried several solutions, such as running librosa & numba on raspberry pi 3 and also https://stackoverflow.com/a/52941768/10499025

Neither pip nor conda nor clone git would function properly, also downloading the librosa zip and installing it manually with

python setup.py install

did not work out; I tried it with and without virtualenv,

my guess is that the problem is something with the sidepackages, So I tried installing the side packages seperately. That only worked out with git clone and I do not know for sure if I installed them properly. Although that did not solve all of my problems, it seemed to solve the building wheels problem for scipy and numpy, but still llvmlite was not working.

Moreover I also tried to update my setuptools, pip and python in general, also tried pip/pip3 and tried mentioning the --user. Everything without any effect.

I understand that I need certain versions of the packages for librosa in order to function, and I guess my problem is something with building wheels and finding packages, or at least the right versions of these packages.

the packages I am struggeling with most are SCIPY, NUMPY, SCIKIT-LEARN and LLVMLITE.

Anyway, I think I confused myself rather than help understand it. So, as I said before I am thankful for any advice, insight etc..!

So, here are my error codes:

When I try installing librosa I always get:

with virtualenv:

sudo apt install libblas-dev llvm python3-pip python3-scipy
virtualenv --system-site-packages -p python3 env
source env/bin/activate
pip install llvmlite==0.15.0
pip install numba==0.30.1
pip install librosa

error:

Command "/home/pi/flaskenv/bin/python -u - c "import setuptools, tokenize;__file__='/tmp/pip-install-iYvjRD/scipy/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-record-7L25tV/install-record.txt --single-version-externally-managed --compile --install-headers /home/pi/flaskenv/include/site/python2.7/scipy" failed with error code 1 in /tmp/pip-install-iYvjRD/scipy/

--> full error code:

https://docs.google.com/document/d/1dHq0S227vld4iJ7H2SgaDJ2jlD95bZUKqkUH4VhrS2U/edit?usp=sharing

without virtualenv:

sudo pip install librosa

Failed building wheel for scipy
Failed cleaning build dir for scipy
Failed building wheel for llvmlite

error:

`Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-AUlqg0/scipy/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-44B19L-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-AUlqg0/scipy/

` --> full error code:

https://docs.google.com/document/d/1pPs6JEqeJ2uS1xWCg8d_dqsbJ6Tgh2EO-eB5aUOYU7I/edit?usp=sharing

installing with conda fails always because of audioread --> audioread is not found

So right now, I am thinking that maybe I should install numpy and scipy manually before librosa, than using this lines to get the right versions of llvmlite and numba

udo apt install libblas-dev llvm python3-pip python3-scipy
pip install llvmlite==0.15.0
pip install numba==0.30.1

and then trying to install librosa? Would that work? Am I missing something really important? Already thank you for reading through this haha! And looking forward to any solutions!! Lola

PS: I am working on a raspberrypi3 with noobs

0

There are 0 best solutions below