I have 2 versions of Python installed: x86 and x64 (3.10.).
Only x64 is allowed in PATH
due to internal technicalities.
The task is to embed Python (x86) in C++ x86 app. Again, due to internal specifics, only this type of embedding can happen at the moment.
Question: How can I re-direct Py_Initialize()
; to point to specifically x86 PYTHONHOME
.
What I have tried so far was to:
- Define const wchar_t* that points to place where Python x86 is installed
- Call
Py_SetPythonHome(...)
; - Compiles without errors (in x86 Debug Mode)
- Execution fails
(setting explicitly
PYTHONHOME
in env var did not help either)
OS: Windows 10 // Windows Server. IDE: VS-2015/2019
If I do an x64 compilation and/or modify PATH
to have x86 Python priority -> all is good.
Could someone help and point to where I'm missing something.