0

好的,所以我真的很喜欢 kivy 的声音,但事实证明安装它真的很痛苦,我已经安装了它要求的所有依赖项,但我不断收到以下错误消息:

Error compiling Cython file:
 ------------------------------------------------------------
 ...
     cpdef release(self)
     cpdef get_pixel_color(self, int wx, int wy)

     cdef void create_fbo(self)
     cdef void delete_fbo(self)
     cdef void apply(self)
                   ^
 ------------------------------------------------------------

 kivy/graphics/fbo.pxd:27:19: Signature not compatible with previous declaration

 Error compiling Cython file:
 ------------------------------------------------------------
 ...
     cdef void push_states(self, list names) except *
     cdef void pop_state(self, str name) except *
     cdef void pop_states(self, list names) except *
     cdef void enter(self) except *
     cdef void leave(self) except *
     cdef void apply(self) except *
                   ^
 ------------------------------------------------------------

 kivy/graphics/instructions.pxd:123:19: Previous declaration is here
building 'kivy.graphics.vbo' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c /tmp/pip-build-PA4_U4/kivy/kivy/graphics/vbo.c -o build/temp.linux-i686-2.7/tmp/pip-build-PA4_U4/kivy/kivy/graphics/vbo.o
/tmp/pip-build-PA4_U4/kivy/kivy/graphics/vbo.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
 #error Do not use this file, it is the result of a failed Cython compilation.
  ^
 error: command 'gcc' failed with exit status 1

----------------------------------------

 

Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-PA4_U4/kivy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-DiTplK-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-PA4_U4/kivy

我不确定如何处理它,所以有人可以帮助我。

非常感谢

克里斯

4

1 回答 1

1

我已经做了,我需要通过 pip 安装 Cython,命令是:

sudo pip install -I Cython==0.21.2

之后我就能够成功安装 kivy。

于 2015-10-28T12:18:01.167 回答