running librosa & numba on raspberry pi 3

前端 未结 5 1650
离开以前
离开以前 2020-12-19 16:28

I am trying to run librosa on my raspberry pi 3. After hours of searching through the internet I was finally able to install it but it still throws an error when I try to i

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-19 17:05

    If you have previously installed packages, either reboot with a fresh copy of OS or create a virtual environment, as suggested by others. Creating virtual env did not work at the first try for me, you might want to reboot to a fresh copy.

    Then install virtualenv and create a new virtualenv.

    Activate the virtualenv using python3.

    sudo apt-get install llvm
    

    You should get llvm 7.0.x

    Then install a compatible llvmlite - this works for 7.0. Get the path by typing which llvm-config In my case it was /usr/bin/llvm-config

    LLVM_CONFIG=/usr/bin/llvm-config pip3 install llvmlite==0.32
    

    install dependencies

    pip3 install numpy==1.16.1 numba==0.49
    
    pip3 install librosa
    

    If you get an error after trying to import librosa due to numpy, update dependencies

    sudo apt-get install libatlas-base-dev
    

    Credits to this tutorial

提交回复
热议问题