Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can i include python 2.7.x in an embedded linux yocto image?

Can anyone point me to a tutorial or a reference recipe that includes the right yocto layer to produce a rootfs that has python 2.7 goodies?

I prefer to not use 'dev-pkgs' as an IMAGE_FEATURES because it would include way more than i need.

Thanks for your time and help.

like image 791
user3342339 Avatar asked Jan 09 '23 17:01

user3342339


1 Answers

Despite poky already contains maybe all what you need regarding python,

meta-python is the layer you are looking for. It will give you more extensive range of recipes and packages.

Use the CORE_IMAGE_EXTRA_INSTALL variable to include the recipes you need.

As the ones you need, take a look at this recipe, which has a lot of dependencies on python packages(and python as well).

Notice the number 3 on the recipe name, as you mention python 2.7 you should avoid include any recipe starting with python3.

On the other side note that there are many internal of subpackages for example: python-threading python-multiprocessing python-subprocess python-misc python-netclient which are not external packages but internal parts of python which you may require.

A way to start would be including in your local.conf python-core and see during deployment which other modules you might need,

CORE_IMAGE_EXTRA_INSTALL = "python-core"

Another option is to include pip:

CORE_IMAGE_EXTRA_INSTALL = "python-core python-pip"

like image 64
urnenfeld Avatar answered Jan 26 '23 18:01

urnenfeld