This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author illera88
Recipients illera88
Date 2018-07-05.22:41:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1530830509.1.0.56676864532.issue34057@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2018-07-05 22:41:49illera88setrecipients: + illera88
2018-07-05 22:41:49illera88setmessageid: <1530830509.1.0.56676864532.issue34057@psf.upfronthosting.co.za>
2018-07-05 22:41:49illera88linkissue34057 messages
2018-07-05 22:41:49illera88create