# How to include more python3 modules in the image

**URL:** https://forum.legato.io/t/how-to-include-more-python3-modules-in-the-image/2749
**Category:** Legato Linux distribution (Yocto project)
**Created:** [October 30, 2017, 12:21pm UTC](https://forum.legato.io/t/how-to-include-more-python3-modules-in-the-image/2749 "2017-10-30T12:21:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yclai](https://avatars.discourse-cdn.com/v4/letter/y/3bc359/32.png) [@yclai](https://forum.legato.io/u/yclai)
#### Post date: [October 30, 2017, 12:21pm UTC](https://forum.legato.io/t/how-to-include-more-python3-modules-in-the-image/2749/1 "2017-10-30T12:21:40Z")

</div>

Hi,

I am working on wp85 product. We need to include more python3 modules in order to run a script on WP85 during development.

I build a new image based on the linux OS source: SWI9X15Y\_07.12.09.00 (16.10.3)  
[https://source.sierrawireless.com/resources/legato/downloads/](https://source.sierrawireless.com/resources/legato/downloads/)  
and adding the lines

CORE\_IMAGE\_EXTRA\_INSTALL = “python3 python3-subprocess”

Though, I have python3 installed in the new image but it is still lacking some modules.  
ex. argparse, serial, datetime, hashlib, enum, \_posixsubprocess

And I see the poky & oe version we use use doesn’t provide all the recipes for the modules. (or maybe I misunderstood it.)

How should I include the python3 modules into the image correctly?

Thanks.

---

<div class="post-metadata">

### Author: ![yclai](https://avatars.discourse-cdn.com/v4/letter/y/3bc359/32.png) [@yclai](https://forum.legato.io/u/yclai)
#### Post date: [November 2, 2017, 9:06am UTC](https://forum.legato.io/t/how-to-include-more-python3-modules-in-the-image/2749/2 "2017-11-02T09:06:12Z")

</div>

Most of the packages are stated in python-3.3-manifest.inc .  
We also need to add python3-misc otherwise there will be some package issue.

---

<div class="post-metadata">

### Author: ![Manukumar](https://avatars.discourse-cdn.com/v4/letter/m/eada6e/32.png) [@Manukumar](https://forum.legato.io/u/Manukumar)
#### Post date: [December 16, 2017, 10:39am UTC](https://forum.legato.io/t/how-to-include-more-python3-modules-in-the-image/2749/3 "2017-12-16T10:39:10Z")

</div>

biitbake processed the settings in conf/local.conf.  
use this IMAGE\_INSTALL\_append = “python3 python3-subprocess” insted of CORE\_IMAGE\_EXTRA\_INSTALL  
If you use CORE\_IMAGE\_EXTRA\_INSTALL bitbake does not install what image is needed.  
or  
you can go to corresponding recipes of .bb file and  
IMAGE\_INSTALL += “python3 python3-subprocess”

---

<div class="post-metadata">

### Author: ![yclai](https://avatars.discourse-cdn.com/v4/letter/y/3bc359/32.png) [@yclai](https://forum.legato.io/u/yclai)
#### Post date: [January 5, 2018, 7:55am UTC](https://forum.legato.io/t/how-to-include-more-python3-modules-in-the-image/2749/4 "2018-01-05T07:55:14Z")

</div>

Hi,  
CORE\_IMAGE\_EXTRA\_INSTALL has the same effect as IMAGE\_INSTALL\_append and IMAGE\_INSTALL.  
yocto version we use is old and it has some packaging problem therefore “python3-misc” need to be added to the image too.

---

<div class="post-metadata">

### Author: ![mrousocomec](https://avatars.discourse-cdn.com/v4/letter/m/ebca7d/32.png) [@mrousocomec](https://forum.legato.io/u/mrousocomec)
#### Post date: [July 12, 2018, 7:39am UTC](https://forum.legato.io/t/how-to-include-more-python3-modules-in-the-image/2749/5 "2018-07-12T07:39:22Z")

</div>

i have a problème with pprint and and \_ssl modules after building the image i can’t find them  
“Import error: No module named \_ssl, pprint”
