开发者

Python version mismatch, but there's just the one app

I have a C/C++ application in which I define a Python module. I set up Python like this:

PyImport_AppendInittab("myModule", initmymodule);
Py_Initialize();

PyObject *module = PyImport_ImportModule("myModule");

On the ImportModule call, I get this warning:

sys:1: RuntimeWarning: Python C API version mismatch for module myModule: This Python has API version 1012, module myModule has version 1013.

I'm building this app in Xcode, linking against the Python framework in /System/Library/Frameworks (which contains versions 2.3, 2.5 and 2.6). I always include the Python h开发者_运维百科eaders with #include <Python/Python.h>. How can my module have a different version if it's part of the same binary that does the initialization?


Are there any other Pythons installed in /Library/Frameworks/, like ones from a python.org installer?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜