0

I have an RP13 with Raspbian Jessie and have tried to download and use with Python 3.4.2 IDE Kivy 1.9.1.

I have followed all the instructions as per the website, but cannot get the simple tutorial to run:

from kivy.app import App
kivy.require("1.9.1")

from kivy.uix.label import Label

class SimpleKivy(App):
    def build(self):
        return Label(text="Kivy 1 working")
if __name__ == "__main__":
    SimpleKivy().run()

This comes up with errors in the shell as below:

[INFO   ] [Logger      ] Record log in /home/pi/.kivy/logs/kivy_16-09-04_4.txt
[INFO   ] [Kivy        ] v1.9.2-dev0
[INFO   ] [Python      ] v3.4.2 (default, Oct 19 2014, 13:31:11) 
[GCC 4.9.1]
 Traceback (most recent call last):
   File "/home/pi/kivy1.py", line 1, in <module>
     from kivy.app import App
   File "/home/pi/kivy/kivy/app.py", line 319, in <module>
     from kivy.base import runTouchApp, stopTouchApp
   File "/home/pi/kivy/kivy/base.py", line 29, in <module>
     from kivy.clock import Clock
   File "/home/pi/kivy/kivy/clock.py", line 364, in <module>
     from kivy._clock import CyClockBase, ClockEvent, FreeClockEvent, \
 ImportError: /home/pi/kivy/kivy/_clock.so: undefined symbol: _Py_ZeroStruct

Any help/advice/suggestions/examples for new Piman.

1

Did you try the following minimal application (from Programming Guide » Kivy Basics)?

import kivy
kivy.require('1.9.1') # replace with your current kivy version !

from kivy.app import App
from kivy.uix.label import Label


class MyApp(App):

    def build(self):
        return Label(text='Hello world')


if __name__ == '__main__':
    MyApp().run()

You can save this to a text file, main.py for example, and run it.

1
  • That won't work either. The Error is in importing: from kivy.app import App, as it states in the first line of his error.
    – Decay X
    Aug 24 '17 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.