Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kivy with pycharm import error

(New in python+kivy here).

Hi, I'm trying to get python with Kivy up in running and I just wanted to know if there's a way to run Kivy apps in PyCharm since I'm getting an error:

Traceback (most recent call last):
  File "C:/Kivy/kivy/examples/tutorials/pong/main.py", line 1, in <module>
    import kivy
ImportError: No module named kivy

when loading this file with pycharm, notice that that's the sample game out of the box, I can run the app via right click->sendTo->kivy.bat but I don't think that large scale apps actually do it that way -.- there must be a simpler(and hopefully more graphic) way to use Kivy, after a lot of asking to Dr. Google I give up, Thanks in advance!:)

BTW: My main interest is making apps that makes basic database requests and at the same time are GUI friendly , Kivy was my first option next to WX but if there are any suggestions they are welcome :)

like image 703
Benjamin Vison Avatar asked Feb 18 '23 03:02

Benjamin Vison


1 Answers

I just put up a tutorial on how to setup pycharm & kivy on os x

Short Version for Windows (I assume this will work):

After you install kivy, you need to create a python interpreter for kivy - if you already had python installed, it's the wrong python to do Kivy work. Check C:/Kivy/kivy/ or the contents of kivy.bat to get the path to the python.exe distributed with kivy ( I found C:\Kivy141\Python\python.exe on one page, but that may be if you install kivy manually)

When you find it, your kivy project python interpreter needt to be that one.

Good luck!

like image 144
Peter Hanley Avatar answered Feb 19 '23 20:02

Peter Hanley