Bug 6967

Summary: Python 3 doesn't work without python3-modules
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: devtools / tool chainAssignee: Alejandro Hernandez <alejandro.hernandez>
Status: VERIFIED FIXED QA Contact: Mihail Stanciu <stanciux.mihail>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, meta.mr.watcher, meta.watcher
Version: 1.7   
Target Milestone: 1.8 M2   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2014-11-13 22:49:26 UTC
A minimal install of python3, that is just python3-core without python3-modules, can't start an interactive interpreter:

root@qemux86:~# python3
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted

After installing the following packages the interpreter starts:

python3-codecs_3.3.3-r0.0.1_i586.ipk
python3-misc_3.3.3-r0.0.1_i586.ipk
python3-io_3.3.3-r0.0.1_i586.ipk
python3-math_3.3.3-r0.0.1_i586.ipk

python3-misc is for reprlib, so this should be moved to another package to avoid pulling in all of python3-misc.  Also python3-io pulls in libssl/libcrypto so it might be worth investigating if the core IO modules can be moved into a core package.
Comment 1 Alejandro Hernandez 2014-12-11 21:58:08 UTC
A minimal install of python3-core now works out of the box, also, python3-misc is not necessary anymore, a package python3-reprlib was created to solve this issue.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=74d4a5cb908c08f5e76886923430f898b4d62015
Comment 2 Mihail Stanciu 2015-02-17 14:18:00 UTC
Verified on master: 6ae933b75c1c34a9d39e1aff0a0cb26a7ce4677f