Message355173
| Author |
vstinner |
| Recipients |
brett.cannon, carljm, eric.araujo, eric.snow, ncoghlan, pitrou, rhettinger, twouters, vstinner |
| Date |
2019年10月22日.23:08:34 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1571785715.1.0.188181066265.issue12919@roundup.psfhosted.org> |
| In-reply-to |
| Content |
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> |
|