Importing tensorflow when embedding python in c++ returns null

后端 未结 2 1775
猫巷女王i
猫巷女王i 2020-12-19 08:55

I\'ve a question regarding embedding python into a C++ application. The setup is as follows: I have a large C++ application which generates some data (renders images in real

2条回答
  •  鱼传尺愫
    2020-12-19 09:05

    I've resolved the issue. I needed to set argc and argv with PySys_SetArgv. I've uncovered this using PyErr_Occurred() and PyErr_Print() right after the failed import to see the problem.

提交回复
热议问题