2014-10-07 47 views
2

后混帐克隆蟒蛇换机器人我试图创建分发:的Python换安卓错误编译用Cython文件

./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 

找到this answer,这并没有解决我的问题:

sudo apt-get remove --purge cython 
sudo pip install cython 

我需要一个特定的Cython版本吗?

谢谢!

更新

感谢@RyanP我试图运行:

cython -V 
cython shader.pyx 

好,用Cython版本似乎确定:

Cython version 0.21 

但尽管如此,shader.pyx不会编译与非常相同的错误。

另一个更新

我做了两个:

  1. 使用@inclement建议和取出都和builddist
  2. 使用export P4A_kivy_DIR=/path/to/cloned/kivy/

而且dist/default终于创建。

+1

此代码将使用Cython 0.21构建。如果这些说明不适合你,那么你的系统有一个问题妨碍你运行正确的Cython。 – 2014-10-07 15:33:45

+0

谢谢@RyanP我搜索了我的整个系统'find/-name“cython”',发现只有cython 0.21 – Michael 2014-10-07 16:32:22

+3

问题是它试图编译一个非主pyjnius。你可以在你的python-for-android中删除'build'和'dist'文件夹,然后再试一次吗? – inclement 2014-10-07 16:56:52

回答