Skip to main content
Associate II
March 11, 2025
Question

How to build a OpenSTLinux Distribution package image having multiple python versions?

  • March 11, 2025
  • 1 reply
  • 558 views

I am new to building images using Yocto. I am working with an STM32MPU157F, which comes with OpenSTLinux by default. The default image includes Python 3.12.4, but I also need to have Python 3.11.5 available on the image. My end goal is to have both Python versions installed in a single image and ran a AI application.

1 reply

Jean-Christophe_TROTIN
ST Employee
March 26, 2025

Hi @AbhijithKannan ,

 

To have Python 3.11.5 available on the image (while keeping Python 3.12.4), I could suggest two ways:

* Using the OpenSTLinux SDK form the developer package (https://wiki.st.com/stm32mpu/wiki/STM32MPU_Developer_Package) to build Python 3.11.5 from its source code (https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package). This way might be interesting to make a quick test.

* Creating a custom layer (https://wiki.st.com/stm32mpu/wiki/How_to_add_a_customer_application) in the scope of the distribution package (https://wiki.st.com/stm32mpu/wiki/STM32MPU_Distribution_Package), adding in this layer a recipe for Python 3.11.5 (it might be copied/pasted/adapted from the recipe for Python 3.12.4), and adding this new layer to the built image (for example through the local.conf file). This way might be interesting to create a “new” distribution that includes both Python versions.

 

Hope this information helps.

 

Regards,

JC.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.