2017-09-04 279 views
1
kivy/graphics/svg.pyx:469:9: 'reload' already defined 
building 'kivy.graphics.svg' extension 
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC  -Ikivy/include -Ikivy/include -I/usr/include/python2.7 -c kivy/graphics/svg.c -o build/temp.linux- x86_64-2.7/kivy/graphics/svg.o 
kivy/graphics/svg.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 'x86_64-linux-gnu-gcc' failed with exit status 1 

我試圖在Ubuntu 16.04上安裝kivy。當我執行「python setup.py build_ext --inplace -f」這個指令顯示上面的錯誤,請幫助我...在Ubuntu上安裝Kivy時出錯

+0

提到哪個'os'正在使用。? –

回答

0

恕我直言,更容易使用apt-get或pip。

0
pip install Cython #pip or pip3 
pip install Kivy 

編輯: 當然安裝gcc

0

什麼是你用Cython版本?你可能想要將它更新到0.24或0.25來構建kivy。

pip install -U cython==0.25 
0

我在Ubuntu 16.04 LTS上使用Kivy,並使用以下安裝步驟。 Kivy示例是可選的:

$ sudo add-apt-repository ppa:kivy-team/kivy 
$ sudo apt-get update 
$ sudo apt-get install python3-kivy 
$ sudo apt-get install python-kivy-examples 
$ sudo pip install --upgrade cython==0.26 
3

很可能您的cython版本不正確。 對於當前版本的kivy(1.10.0),我已經成功使用了cython == 0.26。安裝與0.27.1和0.27.3失敗,與您的錯誤相同。

所以在您的相關蟒蛇環境,卸載當前用Cython:

pip uninstall cython==0.2x.x (給你安裝用Cython的正確版本)

conda uninstall cython

安裝用Cython = = 0.26

pip install cython==0.26

(似乎沒有要在LINUX64安納康達通道0.26版本用Cy​​thon的)

然後:pip install kivy

0

對於kivy版本1.10.0,用Cython必須是0.26