STINNER Victor <vstin...@python.org> added the comment:
I backported my change to Python 3.8. Example with PYTHONPATH set to Python 2.7 with Python 3.8: $ PYTHONPATH=/usr/lib64/python2.7/ ./python -c pass Python path configuration: PYTHONHOME = (not set) PYTHONPATH = '/usr/lib64/python2.7/' program name = './python' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = '/home/vstinner/python/3.8/python' sys.base_prefix = '/usr/local' sys.base_exec_prefix = '/usr/local' sys.executable = '/home/vstinner/python/3.8/python' sys.prefix = '/usr/local' sys.exec_prefix = '/usr/local' sys.path = [ '/usr/lib64/python2.7/', '/usr/local/lib/python38.zip', '/home/vstinner/python/3.8/Lib', '/home/vstinner/python/3.8/build/lib.linux-x86_64-3.8-pydebug', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized File "/usr/lib64/python2.7/encodings/__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax Current thread 0x00007fe3ade4d740 (most recent call first): <no Python frame> ---------- versions: +Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38236> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com