2

I'm using Qpython v2.2.4-8 with python 2.7.12, and am trying to get a kivy app to run. I installed the pip libraries lxml-u4-qpython and kivy-u4-qpython via the app's terminal, and created a new sample kivy app which has this code by default:

#-*-coding:utf8;-*-
#qpy:2
#qpy:kivy

from kivy.app import App
from kivy.uix.button import Button

class TestApp(App):
    def build(self):
        # display a button with the text : Hello QPython 
        return Button(text='Hello QPython')

TestApp().run()

However, when I try to run the code, I get the exception ImportError: No module named kivy.app

Maurdekye
  • 3,597
  • 5
  • 26
  • 43

2 Answers2

0

I belive you need to add the line:

import kivy

at the beginning of your code in order for kivy to run.

I would like to hear your feedback if this actually was the problem or you already found out how it works

0

I don't think that Qpython comes installed with the kivy library. You can use another android application called pydroid3 . Kivy is already installed in the app, it also has some packages you might need. It can also run kivymd.