STINNER Victor <[email protected]> added the comment:
I close the issue since I see disagreement on the feature request.
Modules/getpath.c and PC/getpathp.c use Lib/os.py to detect the stdlib
directory.
_PyUnicode_InitEncodings() is the first function importing modules: to import
the Python codec of the filesystem encoding. If this import fails, Python now
dumps the "path configuration" to help users to debug their setup. See
bpo-38236.
Example:
$ PYTHONHOME=/xxx ./python -c pass
Python path configuration:
PYTHONHOME = '/xxx'
PYTHONPATH = (not set)
program name = './python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/home/vstinner/python/master/python'
sys.base_prefix = '/xxx'
sys.base_exec_prefix = '/xxx'
sys.executable = '/home/vstinner/python/master/python'
sys.prefix = '/xxx'
sys.exec_prefix = '/xxx'
sys.path = [
'/xxx/lib/python39.zip',
'/xxx/lib/python3.9',
'/xxx/lib/python3.9/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the
filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f845ca19740 (most recent call first):
<no Python frame>
----------
nosy: +vstinner
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue12919>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com