title: Why is kivy not working in Visual Studio code?
body: <p>I was writing a piece of code with kivy with all the packages installed.</p>
  <p>When I run the code it still shows &quot;No module named kivy&quot;.</p>
  <p>The modules were installed from both the command prompt and the VS code terminal though this code had worked fine just a few days ago. Today i opened it and it showed me this error</p>
  <p>This is my code</p>
  <pre class="lang-py prettyprint-override"><code>from kivy.app import App
  from kivy.lang import Builder
  from kivy.uix.screenmanager import ScreenManager, Screen
  from kivy.properties import ObjectProperty
  from kivy.uix.popup import Popup
  from kivy.uix.label import Label
  from database import DataBase
  
  
  class CreateAccountWindow(Screen):
      namee = ObjectProperty(None)
      email = ObjectProperty(None)
      password = ObjectProperty(None)
  
      def submit(self):
          if self.namee.text != &quot;&quot; and self.email.text != &quot;&quot; and self.email.text.count(&quot;@&quot;) == 1 and self.email.text.count(&quot;.&quot;) &gt; 0:
              if self.password != &quot;&quot;:
                  db.add_user(self.email.text, self.password.text, self.namee.text)
  
                  self.reset()
  
                  sm.current = &quot;login&quot;
              else:
                  invalidForm()
          else:
              invalidForm()
  
      def login(self):
          self.reset()
          sm.current = &quot;login&quot;
  
      def reset(self):
          self.email.text = &quot;&quot;
          self.password.text = &quot;&quot;
          self.namee.text = &quot;&quot;
  
  
  class LoginWindow(Screen):
      email = ObjectProperty(None)
      password = ObjectProperty(None)
  
      def loginBtn(self):
          if db.validate(self.email.text, self.password.text):
              MainWindow.current = self.email.text
              self.reset()
              sm.current = &quot;main&quot;
          else:
              invalidLogin()
  
      def createBtn(self):
          self.reset()
          sm.current = &quot;create&quot;
  
      def reset(self):
          self.email.text = &quot;&quot;
          self.password.text = &quot;&quot;
  
  
  class MainWindow(Screen):
      n = ObjectProperty(None)
      created = ObjectProperty(None)
      email = ObjectProperty(None)
      current = &quot;&quot;
  
      def logOut(self):
          sm.current = &quot;login&quot;
  
      def on_enter(self, *args):
          password, name, created = db.get_user(self.current)
          self.n.text = &quot;Account Name: &quot; + name
          self.email.text = &quot;Email: &quot; + self.current
          self.created.text = &quot;Created On: &quot; + created
  
  
  class WindowManager(ScreenManager):
      pass
  
  
  def invalidLogin():
      pop = Popup(title='Invalid Login',
                    content=Label(text='Invalid username or password.'),
                    size_hint=(None, None), size=(400, 400))
      pop.open()
  
  
  def invalidForm():
      pop = Popup(title='Invalid Form',
                    content=Label(text='Please fill in all inputs with valid information.'),
                    size_hint=(None, None), size=(400, 400))
  
      pop.open()
  
  
  kv = Builder.load_file(&quot;my.kv&quot;)
  
  sm = WindowManager()
  db = DataBase(&quot;users.txt&quot;)
  
  screens = [LoginWindow(name=&quot;login&quot;), CreateAccountWindow(name=&quot;create&quot;),MainWindow(name=&quot;main&quot;)]
  for screen in screens:
      sm.add_widget(screen)
  
  sm.current = &quot;login&quot;
  
  
  class MyMainApp(App):
      def build(self):
          return sm
  
  
  if __name__ == &quot;__main__&quot;:
      MyMainApp().run()
  </code></pre>
  <p><img src="https://i.stack.imgur.com/0Md6Q.png" alt="enter image description here" /></p>