我已经使用Cython成功生成了.c文件,但是当我尝试使用gcc编译它时,我得到了这些错误......这只是错误的第一行......有3页错误类似于这...我的.py代码很简单:
print "test"
错误:
unknown type name ‘Py_UNICODE’
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
答案 0 :(得分:0)
引用它:
Cython is not a Python to C compiler in the sense that it does away
with the Python interpreter/runtime, rather it creates .c files that
are compiled against the Python/C API and can be loaded into a running
session.
请参阅this list of interpreters,其中列出了一些可能对您有用的编译器!
有关编译的指南,请查看the compilation page of the Cython wiki