Kivy with pycharm import error

(New in python + kivy here).

Hi, I am trying to run python with Kivy, and I just wanted to find out if there is a way to start Kivy applications in PyCharm, since I get the error message:

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 downloading this file using pycharm, pay attention to the fact that this test game is out of the box, I can start the application with the right click β†’ sendTo-> kivy.bat, but I don’t think that applications on a large scale actually do it So there should be a simpler (and, hopefully, more graphic) way to use Kivy, after you ask a Google doctor to refuse, thanks in advance! :)

BTW: My main interest is that applications that make basic database queries and are GUI friendly at the same time, Kivy was my first option alongside WX, but if you have any suggestions, they are welcome :)

+3
source share
5 answers

I just advised how to configure pycharm and kivy on os x

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

After installing kivy, you need to create a python interpreter for kivy - if you already have python installed, this is the wrong python for Kivy to work. Check C: / Kivy / kivy / or the contents of kivy.bat to get the path to python.exe distributed with kivy (I found C: \ Kivy141 \ Python \ python.exe on one page, but maybe if you install Kiwi by hand)

When you find it, your python qiwi interpreter project should be like this.

Good luck

+3
source

With PyCharm on OSX, I had the same problem and solved it by creating VirtualEnv in PyCharm (see PyCharm docs for this) and some Kivy paths to virtualenv. You can find this by selecting VirtualEnv and selecting the Paths tab. You can probably find the correct paths by checking the kivy.bat file. I did something similar on a Mac. I wanted to include an image to show my path settings, but my Stackoverflow karma level does not allow this.

+3
source

PyCharm 4.0 changed the answer, now it just set some environment variables. I updated the Kivy Wiki to configure PyCharm on OSX

0
source

For OSX 10.10.2, kivy 1.9.0 and Pycharm 5.0.2 (free Community Edition), the instructions on the link below worked for me:

Configuring Kivy 1.9.0 with PyCharm 4.5 EAP for OS X 10.10.3

  • Replace PyCharm for PyCharm-EAP in the instructions (which occur only once).

  • I entered each environment variable separately, instead of pasting them into one long line.

  • Pay attention to the titles of the windows into which you enter things. The instructions tell you exactly which window you should look in.

0
source

Anyone who can see this:

Follow the wiki guide to create a symbolic link. In Pycharm, add a local file for the project interpreter, then click the "more" button, go to the pencil and manually change the link to the /Applications/Kivy.app/Contents/Resources/ script. This is how I got my work, the latest PyCharm CE, Kivy, Python 3.5 and El Capitan

0
source

All Articles