Compiling Python extensions for different Python installation

Daniel Dittmar daniel.dittmar at sap.com
Mon Nov 24 05:05:16 EST 2003


John Ky wrote:
> directory.  I can use this fine.  When I build my own
> C module extension and try to run it from Python 2.3
> however, I get this message:
>
> /test-wrk/test_manager/commonlib.py:12: RuntimeWarning: Python C API
> version mismatch for module elxml: This Python has API version 1012,
> module elxml has version 1011.
>
> Could this be because the compilation was made against
> 2.2 and run from 2.3?  If so, is there a way to force
> my module compilation against 2.3?

Just make sure that any include directives in your Makefile point to your
Python 2.3 include directory. It may be necessary to copy
Python-2.3/pyconfig.h to Python-2.3/Include/pyconfig.h.

Daniel







More information about the Python-list mailing list