在git克隆python for android之后,我尝试创建了一个发行版:
./distribute.sh -m "kivy"几乎没有犯过这种错误:
Error compiling Cython file:
------------------------------------------------------------
...
vertex_format.last_shader = self
for i in xrange(vertex_format.vattr_count):
attr = &vertex_format.vattr[i]
if attr.per_vertex == 0:
continue
attr.index = glGetAttribLocation(self.program, <char *><bytes>attr.name)
^
------------------------------------------------------------
kivy/graphics/shader.pyx:448:63: Casting temporary Python object to non-numeric non-Python type找到了这个答案,这并没有解决我的问题:
sudo apt-get remove --purge cython
sudo pip install cython我需要一个特定的Cython版本吗?
谢谢!
更新
感谢@RyanP,我试着运行:
cython -V
cython shader.pyx嗯,Cython版本似乎没问题:
Cython version 0.21但是,shader.pyx不会使用相同的错误进行编译。
另一个更新
我两个都做了:
build和dist。export P4A_kivy_DIR=/path/to/cloned/kivy/最终创建了dist/default。
发布于 2015-01-05 11:15:41
我不相信这是为Cython 0.21构建的,但是对于Cython 0.20,尝试用cython 0.20安装kivy
pip安装cython==0.20
下面是一个描述这个问题的线程
https://mail.python.org/pipermail/cython-devel/2014-October/004210.html
https://stackoverflow.com/questions/26239700
复制相似问题