I am writing C ++ code that should call Python scripts below. For this, I am using cpython from python.org . Some of the python scripts execute .net code with python for .net, and when it comes to .net, all of this fails. I tried to create a test application to check where it did not work, and found that it could not import the clr module.
When I run this code, it gives me ImportError: There is no module named clr
Py_Initialize();
PyRun_SimpleString("import clr");
If I go into the Python console and type "import clr", everything works fine. I also checked sys.path and it contains the folder where clr.pyd is located in "C: \ Python27 \ DLLs". I also tried setting this path in C ++:
char* path = "C:\\Python27\\dlls";
Py_Initialize();
PySys_SetArgv(1, &path);
char* phome = Py_GetPythonHome();
. , , clr clr.pyd, .pyc, .
- , clr CPython? ?