Mar-07-2017, 02:25 PM
(This post was last modified: Mar-07-2017, 02:25 PM by SmithPython.)
Thanks for your answer.
This morning I have looked more deeply for the cause of my problem and I have followed the idea that consists in comparing the debug of python_d.exe initialization and the one of my test project. It results that initialization needs stuff in PYTHONHOME\Lib to succeed. In my case, the calculate_path function does not encounter any PYTHONHOME content and consider that the encodings files are in ".\Lib" but I have not such a folder in my executable path that explains why I had the error (for python_d.exe, the executable is in an official Python folder tree, and calculate_path() considers that the Lib folder is there, and it is ! so it's working)
Solution I have set up : If no PYTHONHOME is defined, I define it with my executable path after having checked that there is a Lib\extensions folder in it. At install time, I'll deliver in .\Lib and .\Lib extensions the minimum files required to initialize correctly with Py_Initialize().
Hope this can help ,
Julien
This morning I have looked more deeply for the cause of my problem and I have followed the idea that consists in comparing the debug of python_d.exe initialization and the one of my test project. It results that initialization needs stuff in PYTHONHOME\Lib to succeed. In my case, the calculate_path function does not encounter any PYTHONHOME content and consider that the encodings files are in ".\Lib" but I have not such a folder in my executable path that explains why I had the error (for python_d.exe, the executable is in an official Python folder tree, and calculate_path() considers that the Lib folder is there, and it is ! so it's working)
Solution I have set up : If no PYTHONHOME is defined, I define it with my executable path after having checked that there is a Lib\extensions folder in it. At install time, I'll deliver in .\Lib and .\Lib extensions the minimum files required to initialize correctly with Py_Initialize().
Hope this can help ,
Julien