Currently, I have a Raspberry Pi 1 Rev2 model B and a Raspberry Pi 3, I'm developing an app that could check dynamic values from several screens, I'm using a 7inch LCD Screen to look the graphics generated from the kivy app.

The problem is that when I test codes that I could use to my code, they are tested in windows 10 and works great, however, when I pasted this code inside the Raspberry Pi and run it, the screen goes black and I can see nothing more, also the touchscreen doesn't work in the kivy app (It works ok outside of the kivy app).

I started to think that was something related to the kivy versions, so I check them:

Windows 10 kivy version: 1.10.0 Raspberry Pi kivy version: 1.10.1.dev0 (I don't know what's the meaning of dev0)

So I use the line code: import kivy kivy.requires('1.10.0')

Without any good results, I will paste code from another thread from here in StackOverflow, however, I missed the link so forgive me that:

This is only a code that I wanted to test to use the same logic for my purposes, it will change the label text dynamically.


from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import StringProperty
import random

class YourWidget(Widget):
    random_number = StringProperty()

    def __init__(self, **kwargs):
        super(YourWidget, self).__init__(**kwargs)
        self.random_number = str(random.randint(1, 100))

    def change_text(self):
        self.random_number = str(random.randint(1, 100))

class YourApp(App):
    def build(self):
        return YourWidget()

if __name__ == '__main__':


        size: root.size
            id: button1
            text: "Change text"
            on_release: root.change_text()
            id: label1
            text: root.random_number

Let me know what ideas you have to help with this, it's really annoying that I can't keep going to this kind of problem.


2 Answers 2


I had a similar situation and the problem was that kivy has a stricter naming convention for the kv file in linux than windows from what I think.

Try renaiming your kv to Your.kv and your.kv

If this does not help explicitly load your kv file with


or use

... """")

Maybe you can also upload the log file you get when starting kv


Change your .py to Your.py and .kv to Your.kv and the name before App must be same as kv file name(Case sensitive).

  • Why does should it help? We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed or you risk to get down votes. Please take the short Tour and visit the Help Center to get an idea how things work here.
    – Ingo
    Commented May 24, 2019 at 19:36
  • He named his app name as YourApp(App) in his python code in order to bind his kv file to his py file Commented May 25, 2019 at 3:06
  • Please can you elaborate it in your answer? You can edit it. And yes, it is really a good idea for you to take the Tour :-)
    – Ingo
    Commented May 25, 2019 at 8:29
  • he Built an App class YourApp(App) so it will try to bind a kv file named Your.kv (whatever written before App) its case sensitive too Commented Nov 25, 2019 at 7:20
  • I think you are right as the comments BUT please change the answer's body and add more explanation & clarification. Commented Feb 19, 2020 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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