I've entered this code in Pyscripter:
import kivy
kivy.require('1.7.2')
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text='Hello Kivy')
MyApp().run()
I then press the Run button (the green triangle). I get the following error:
Import error: No module named kivy
What can I do to make this work?
P.S. I know I can leave Pyscripter and use kivy.bat, but I would like to use the debugging capabilities within Pyscripter.
I think this is probably because kivy.bat really sets up and uses a second python distribution that has kivy installed. However, pyscripter is using your normal system installation, which does not have the kivy module installed.
You can probably tell pyscripter to use the kivy interpreter with the right environment set up. I don't know how exactly (I haven't ever tried on windows), but for instance this previous question is similar but about pycharm rather than pyscripter. I have pasted the answer below, some of it relates specifically to pycharm but something similar will probably work for pyscripter.
You can also try to install kivy in your existing python installation. The kivy website has instructions for this here. I haven't tried this, and there may be some tricky bits.