Bug 13547 - python3: http.server: No module named 'runpy'
Summary: python3: http.server: No module named 'runpy'
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: oe-core other (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.8 M4
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2019-09-24 12:58 UTC by Ovidiu Panait
Modified: 2019-10-03 15:11 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.