Pycharm running Kivy applications

2019-09-15 10:44发布

问题:

I'm running Pycharm 3.4.1 and i just downloaded the Kivy 1.8.0 for python 2.7 pack for windows. http://kivy.org/#download

I chose the kivy interpreter as my python interpreter for the project:

C:\Python_Kivy_1.8.0\Python27\python.exe

The problem i'm having is that i can't get my Pycharm to run or recognize Kivy at all. There is no auto-completion when writing code and it can't execute via Pycharm. The only way i can execute the program is by running the python file with the kivy.bat file, and that is anoying to do every time.

When i'm trying to execute the code via pycharm i get the following error:

Traceback (most recent call last):
  File "C:/Users/Victor/Dropbox/Private/filewatcher_gui/main.py", line 1, in <module>
    import kivy
ImportError: No module named kivy

Process finished with exit code 1

I hope you can help me.

回答1:

The kivy wiki has some pages on configuring for different ides, including pycharm.

You could also probably install in your existing installation using the (unofficial) prebuilt windows packages here. Make sure to get kivy's dependencies as well if you try this way.