Eryk Sun <eryk...@gmail.com> added the comment:
This looks to be a bug in the constructor of pip's BuildEnvironment class: https://github.com/pypa/pip/blob/a4f4bfbf8ba7fd1e60884a439907e3f2a32e117a/src/pip/_internal/build_env.py#L82 Python 3 source files are UTF-8 by default, but text files default to the platform's preferred encoding, unless overridden by Python's UTF-8 mode. It is thus a mistake to create "sitecustomize.py" without explicitly specifying UTF-8 as the encoding. The preferred encoding in Windows is the process active code page, which is the system code page, unless, in Windows 10 only, it's overridden to use UTF-8 by the application manifest's "activeCodePage" setting. The system code page is usually a legacy code page, such as 1252, unless, in Windows 10 only, it's set to UTF-8 or the system language is Unicode only (e.g. Hindi). ---------- nosy: +eryksun _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42293> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com