Kivy code working fine from the CMD python shell but not from a file saved at Desktop or any location -


from kivy.app import app kivy.uix.label import label  class simple(app):     def build(self):         return label(text = "hello world")  if __name__ == "main__":     simple().run() 

the above code works fine when written in python cmd shell, code not works when saved in file.

on cmd python shell:

enter image description here

from idle, sublime text , different text editors (the file saved on desktop):

enter image description here

here's answer own question. issue python path. since creating file on desktop. not reading python or kivy's path correctly. solution create or save project in directory inside python's directory. worked me.


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -