[Pyrex] Pyrex - 'PyFrameObject' is not declared

Stefan Behnel stefan_ml at behnel.de
Mon Mar 5 21:18:17 CET 2018


Hi!

Sergius Master schrieb am 05.03.2018 um 11:16:
> Actually, I've posted this problem to StackOverflow few days ago and get no
> answers -
> https://stackoverflow.com/questions/49011021/pyrex-pyframeobject-is-not-declared
> I found one solution - compile on CentOS 6.5 with Python2.7 and put *.so
> file to CentOS 7.4 and it looks working now, but I'm not sure if everything
> is ok, because I faced a lot of problems with other approaches.
> Could you help, please, to find a 100% right solution?

As hinted in the answer that you got now, it might help to put an additional

	ctypedef struct PyFrameObject

before the declaration in the "python.pxi" file.

On a more general note, Pyrex hasn't been updated in many years. Since
you're modernising the code anyway, consider giving Cython a try instead.
It was originally based on Pyrex but is much more advanced in many ways,
including Python language feature support, performance and compatibility
with recent Python versions.

http://cython.org/

Stefan



More information about the Pyrex mailing list