New submission from Alberto <agarciaill...@gmail.com>:
Hi, I've followed the build instructions to get a statically linked Python library in windows. The compilation works great and I get a big fat statically linked .lib file. When I use it and in my code I call Py_Initialize() the program aborts and I get this error: Fatal Python error: initfsencoding: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' It seems that python is looking for encodings on the file system instead of looking for the built-in one since if I do Py_SetPythonHome(L"C:\\Python37.0-x64"); before calling Py_Initialize it works fine. Why is Python looking for external modules when it is a statically linked library and encodings should be built-in? How can I indicate Python to look for the modules in itself and not externally? Regards ---------- components: Interpreter Core messages: 321140 nosy: illera88 priority: normal severity: normal status: open title: Py_Initialize aborts when using static Python version. Windows type: crash versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue34057> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com