Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

A very simple way to reproduce the bug:

Using pyInstaller, after applying these patches (to fix other Python3.8 issues)

https://github.com/pyinstaller/pyinstaller/pull/4441
https://github.com/pyinstaller/pyinstaller/pull/4440

you will get

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'

This is because Python will use the default value for sys.path, including the 
"lib" subdirectory:

/dist/hello/lib/python3.8
            ^----------------> This should not be here

Instead, that value should be the one that pyinstaller passes when calling 
Py_SetPath() here: 

https://github.com/pyinstaller/pyinstaller/blob/develop/bootloader/src/pyi_pythonlib.c#L495

So it should be:

/dist/hello/python3.8

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38234>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to