Bug 13547

Summary: python3: http.server: No module named 'runpy'
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ovidiu Panait <ovidiu.panait>
Component: oe-core otherAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+    
Version: unspecified   
Target Milestone: 2.8 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ovidiu Panait 2019-09-24 12:58:33 UTC
Steps to reproduce:

$ git clone git://git.yoctoproject.org/poky
$ . poky/oe-init-build-env

local.conf:
IMAGE_INSTALL_append = " python3-core"

$ bitbake core-image-minimal
$ runqemu qemux86-64 nographic kvm slirp

root@qemux86-64:~# python3 -m http.server 9999
Could not import runpy module
ModuleNotFoundError: No module named 'runpy'
Comment 1 Ross Burton 2019-09-25 15:48:29 UTC
That's by design: you installed python3-core which is the core runtime and a little more.  The runpy error - if fixed - would simply change to "cannot find http".

I'll send a fix to ensure that runpy is always present as it's needed for -m to work, but if you want the full python3 environment then install python3, not python3-core.
Comment 2 Ross Burton 2019-10-03 15:11:57 UTC
runpy is in core as of eba857d3e52f83d426e95fa8373799da058f9484.