swati
swati

Reputation: 83

Error Installing Kivy On Ubuntu

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

I am trying to install kivy on ubuntu 16.04 . When I execute " python setup.py build_ext --inplace -f " this instruction shows above error please help me...

Upvotes: 1

Views: 4447

Answers (6)

XaHanu
XaHanu

Reputation: 1

For kivy version 1.10.0, cython must be 0.26

Upvotes: 0

calocedrus
calocedrus

Reputation: 2576

It is likely that you cython version is incorrect. For the current version of kivy (1.10.0), I've had success with cython==0.26. Install failed with 0.27.1 and 0.27.3 with the same error as yours.

So in your relevant anaconda environment, uninstall the current cython:

pip uninstall cython==0.2x.x (give the correct version of your installed cython)

or

conda uninstall cython

Install cython==0.26:

pip install cython==0.26

(there doesn't seem to be a 0.26 version of cython in the linux64 anaconda channel)

Then: pip install kivy

Upvotes: 3

ikolim
ikolim

Reputation: 16001

I am using Kivy on Ubuntu 16.04 LTS and used the following installation steps. Kivy examples is optional:

$ 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

Upvotes: 0

Tshirtman
Tshirtman

Reputation: 5949

What's your cython version? you might want to update it to 0.24 or 0.25 to build kivy.

pip install -U cython==0.25

Upvotes: 0

user8103100
user8103100

Reputation:

pip install Cython #pip or pip3
pip install Kivy   

EDIT: Of course install gcc

Upvotes: 0

Tomek Krasuski
Tomek Krasuski

Reputation: 41

IMHO much easier is to use apt-get or pip.

Upvotes: 0

Related Questions