Error compiling Cython file: EnumType problem

109 views
Skip to first unread message

slonik

unread,
Jul 15, 2016, 9:46:10 AM7/15/16
to cython-users
Hey Everyone,

I am trying to install a very popular NLP (Natural Language Processing) cython-based package spacy: https://github.com/spacy-io/spaCy

and run into a cython compilation problem with both recent cython versions 0.24.1 and 0.24 

$ cython --cplus -o gold.cpp gold.pyx

results in the following error trace:

Error compiling Cython file:
------------------------------------------------------------
...
cdef dict __Pyx_globals = globals()
if PY_VERSION_HEX >= 0x03040000:
                 ^
------------------------------------------------------------
EnumType:51:18: undeclared name not builtin: PY_VERSION_HEX

Error compiling Cython file:
------------------------------------------------------------
...
cdef dict __Pyx_globals = globals()
if PY_VERSION_HEX >= 0x03040000:

    symbol_t = __Pyx_EnumBase('symbol_t', __Pyx_OrderedDict([
                            ^
------------------------------------------------------------
EnumType:53:29: undeclared name not builtin: __Pyx_EnumBase

and so on. It guess it has something to do with cpdef enum definitions and the source file Cython/Utility/CpdefEnums.pyx

Is there a solution or a workaround? Right now I seem to be stuck.

--Leo

Alex Dippel

unread,
Jul 17, 2016, 5:21:46 AM7/17/16
to cython-users
There is a related post that might be of interest: https://groups.google.com/forum/#!topic/cython-users/ZoLsLHwnUY4

slonik

unread,
Jul 17, 2016, 12:12:24 PM7/17/16
to cython-users
Yes, indeed it looks similar. So, it means that it is not just my problem :-) However, there is no solution or workaround posted for the issue. Any help is greatly appreciated.
-- Leo
Reply all
Reply to author
Forward
0 new messages