Incorporating Kivy into pyCharm Project

I am just starting out with pyCharm and I am really enjoying developing python applications with it.

My issues are that I am not really sure how to incorporate Kivy into a new project:

what I did:
under file->settings->project interpreter->Python interpreter, I've added the python interpreter that comes with Kivy. In the same window I also added a path to the Kivy folder I set up.

my issue: Kivy applications are executed with the kivy.bat file. So I am wondering how do I get pyCharm to run my application with the kivy.bat file, rather than the usual python interpreter. I have tried setting up kivy.bat as the python interpreter, but that didn't work.  

Also, this line "from import App" underlines "App" in the editor. pyCharm also underlines "Lable" in the next line.

I have managed to run my script outside of pyCharm so I know it's working.

So I have 2 issues:
  1. Running kivy applications with the kivy.bat file.
  2. Understanding why the editor doesn't recognize the kivy library.

The application:
import kivy
kivy.require('1.0.6') # replace with your current kivy version !

from import App
from kivy.uix.label import Label

class MyApp(App):

    def build(self):
        return Label(text='Hello world')

if __name__ == '__main__':

This is the hello world example from:
Ill appreciate any lead.
Thanks for reading,
Comment actions Permalink

what Kivy version do you use? Can you navigate to on line 4 (using Ctrl + Click)?

For the kivy.bat you can create custom run command in Settings->External Tools and find this command in Tools menu than.
Comment actions Permalink
Thank you very much.

Please sign in to leave a comment.