Py_Initialize Fails - Unable to Load the File System Codec

Py_Initialize fails - unable to load the file system codec

So, for some reason the python dll fails to locate the encodings module. The python.exe executable apparently finds it because it has the expected relative path. Modifying the search path works.

The reason for all of this? Don't know but at least it works. I highly suspect a typo on my part somewhere, that's usually the reason for odd bugs it seems.

Fatal Python error: Py_Initialize: unable to load the file system codec & ModuleNotFoundError

I found a working solution from @Calvin1602 (a Stackoverflow user) from this post Py_Initialize fails - unable to load the file system codec

I just ran into the exact same problem (same Python version, OS, code, etc).

You just have to copy Python's Lib/ directory in your program's
working directory ( on VC it's the directory where the .vcproj is )



Related Topics



Leave a reply



Submit