Python C api PyImport_importmodule fail when the file has an import statement
问题 I tried to use the Python C api to call a function from python in C++, the test was successful. But if I intend to import a module already importing other module, the Pymodule_findmodule will return Null even though it's there and created a compiled file. Here is my code Py_Initialize(); PySys_SetPath("C:/Users/Mik/Documents/GitHub/youtube-dl"); PyObject * pythonFile = PyImport_ImportModule("test2"); Here is the python filed named test2.py at that directory with a file named test_dl.py and a