Message355173
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> |
|
Date |
User |
Action |
Args |
2019-10-22 23:08:35 | vstinner | set | recipients:
+ vstinner, twouters, brett.cannon, rhettinger, ncoghlan, pitrou, carljm, eric.araujo, eric.snow |
2019-10-22 23:08:35 | vstinner | set | messageid: <1571785715.1.0.188181066265.issue12919@roundup.psfhosted.org> |
2019-10-22 23:08:35 | vstinner | link | issue12919 messages |
2019-10-22 23:08:34 | vstinner | create | |
|