I've a weird problem. I'm setting up a project with an embedded Python interpreter. I've rebuilt Python from the sources (3.3.2) and then copied the Python libs as well as the .DLL into my application redistribution folder.
The weird stuff is that, while I'm being able to import a .py module, my recompiled interpreter fails to import a .pyd custom-built file. The same file imports file launching the interpreter from a Python regular distribution.
This is my code:
Py_SetPythonHome((wchar_t *)wideBasePath.c_str());
Py_InitializeEx(0);
PyRun_SimpleString("import MClientAPI");
It fails stating unable to find MClientAPI, while I have a _MClientAPI.pyd file available. I've tried to move it either under site-packages, libs or the root folder with no difference.
Any advice?
MClientAPIwon't load_MClientAPI.pyd, it'll loadMClientAPI.pyd. Do you have a pure python implementation which loads the_version and then fails to itself calledMClientAPI.py? That's the normal reason for such a naming scheme.