Home > OS >  from kivy.app import App ModuleNotFoundError: No module named 'kivy' error
from kivy.app import App ModuleNotFoundError: No module named 'kivy' error

Time:06-11

When I try to run this code:

from kivy.app import App

class TheLabApp(App):
  pass

TheLabApp().run()

it says:

line 1, in from kivy.app import App ModuleNotFoundError: No module named 'kivy'

So what should i do to stop this problem?

CodePudding user response:

I checked in the local environment and got the same problem. When I looked at the sample codes from the main website, I noticed this code.

Can you try this?

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

from kivy.app import App

enter image description here

CodePudding user response:

Have you installed the package?

Try the following code in your CMD terminal.

pip install kivy
  • Related