Eryk Sun <eryk...@gmail.com> added the comment:

Here's a way to trigger this error that's unrelated to the PATH environment 
variable:

    >>> subprocess.call('python', executable=r'C:\Program 
Files\Python36\.\python.exe')
    Fatal Python error: Py_Initialize: unable to load the file system codec
    ModuleNotFoundError: No module named 'encodings'
    [...]

Apparently Windows doesn't normalize the process image path if it uses only 
backslash as the path separator. It normalizes it if at least one backslash is 
replaced with a slash.

----------
nosy: +eryksun

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

Reply via email to