Bug 6967 - Python 3 doesn't work without python3-modules
Summary: Python 3 doesn't work without python3-modules
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.7
Hardware: All Multiple
: Medium+ normal
Target Milestone: 1.8 M2
Assignee: Alejandro Hernandez
QA Contact: Mihail Stanciu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-11-13 22:49 UTC by Ross Burton
Modified: 2015-02-17 14:18 UTC (History)
3 users (show)

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 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