cancel
Showing results for 
Search instead for 
Did you mean: 

SciPy and Librosa libraries on ST MP1 Linux

pignaz
Associate

Hello,

I’m using an ST MP1 Development Kit STM32MP157C-DK2 to develop and deploy projects involving Machine Learning on an SoC.

I need to perform some pre-processing operations on data coming from different sensors and to do so I have at my disposal Python scripts with dependencies from libraries like NumPy, Pandas, SciPy, and Librosa.

While the first ones can be easily resolved by installing them via apt, (python3-numpy and python3-pandas), I’m encountering difficulties with the other ones (scipy and librosa), which are not available on ST repositories.

I tried installing them via pip3, but it requires a compiler to build both libraries and dependencies from scratch, and the current Linux image I’m using doesn’t include it.

Do you have any ideas on how to proceed, to help me?

Thank you,

Andrea.

1 ACCEPTED SOLUTION

Accepted Solutions
Jean-Marc B
ST Employee

Hi @pignaz​ 

The image installed on STM32MP boards doesn't contain any toolchain nor *-dev or *-src packages hence the error displayed when trying to install python modules which need to be built on the board.

To add the python modules SciPy and Librosa, you need to create the corresponding recipes into your Yocto environment.

To add a new recipe, please follow this wiki page: https://wiki.st.com/stm32mpu/wiki/How_to_add_a_customer_application

To build the recipes for SciPy and Librosa, you can use the pipoe utility (https://pypi.org/project/pipoe/) from your host PC:

$> pip3 install pipoe
$> pipoe -p scipy --python python3
$> pipoe -p librosa --python python3

And then just copy the generated .bb files to your layer.

Best regards,

--JM

View solution in original post

1 REPLY 1
Jean-Marc B
ST Employee

Hi @pignaz​ 

The image installed on STM32MP boards doesn't contain any toolchain nor *-dev or *-src packages hence the error displayed when trying to install python modules which need to be built on the board.

To add the python modules SciPy and Librosa, you need to create the corresponding recipes into your Yocto environment.

To add a new recipe, please follow this wiki page: https://wiki.st.com/stm32mpu/wiki/How_to_add_a_customer_application

To build the recipes for SciPy and Librosa, you can use the pipoe utility (https://pypi.org/project/pipoe/) from your host PC:

$> pip3 install pipoe
$> pipoe -p scipy --python python3
$> pipoe -p librosa --python python3

And then just copy the generated .bb files to your layer.

Best regards,

--JM