Search code examples
pythonpython-2.7cygwinctypeskivy

Are there instructions for installing Kivy on cygwin?


I'm failing in running the following hello world on Kivy:

import kivy
kivy.require('1.7.0')

from kivy.app import App
from kivy.uix.button import Label

class HelloApp(App):
    def build(self):
        return Label(text='Hello World!')

if __name__=="__main__":
    HelloApp().run()


with the following errors:

$ python hello1.py 
[INFO   ] Kivy v1.8.0
[INFO   ] [Logger      ] Record log in /home/Administrator/.kivy/logs/kivy_14-10-28_1.txt
 Traceback (most recent call last):
   File "hello1.py", line 5, in <module>
     from kivy.app import App
   File "/home/rbarakx/python/kivy/kivy/app.py", line 321, in <module>
     from kivy.base import runTouchApp, stopTouchApp
   File "/home/rbarakx/python/kivy/kivy/base.py", line 28, in <module>
     from kivy.clock import Clock
   File "/home/rbarakx/python/kivy/kivy/clock.py", line 177, in <module>
     _kernel32 = ctypes.windll.kernel32
 AttributeError: 'module' object has no attribute 'windll'
$ 


I suspect my Kivy cygwin's installation may be lacking.

Are there instructions for installing Kivy on cygwin? (googling the usual suspects did not produce any results)


Solution

  • What fixed the situation?

    1. Prior to installing Kivy, installing Cython and pygame with pip in Cygwin's Python 2.7
    2. Start Cygwin's X11 using startxwin
    3. Define $DISPLAY with export DISPLAY=:0.0