Does Kivy work on MacOS High Sierra using Virtual Box?

123 views
Skip to first unread message

Leonard Gross

unread,
Oct 23, 2018, 6:30:41 PM10/23/18
to Kivy users support

I have used Kivy successfully on Windows, and with Virtual Box (Linux Kivy complete vm) and even with Buidozer on that VM -> Android.  I now need to port to IOS.  I have a High Sierra VM and my first step was to get a

simple program running on MacOS before building an IOS version of the app.   Lots of things tried and the usual Googling.   From some of the discussion it is not clear that it will work because of OpenGL issues.   My host machine supports OpenGL 4.3


Im running Python 2.7 on the MacOS VM, because it appears Buildozer/Python3 for Android does not support SSL, which I need.


I develop using Pycharm (which is wonderful) and when I tried to install some modules that "might" be necessary, it said they weren't available.  These are things like kivy.deps.sdl2, and  kivy.deps.glew


Below is the trivial test program and its error of " Unable to find any valuable Window provider."


So, I'm looking for a path forward.  Perhaps I just need to skip the MacOS step, which seems a bit dangerous?



tiny_test.py

[INFO   ] [Logger      ] Record log in /Users/lengross/.kivy/logs/kivy_18-10-23_55.txt

[INFO   ] [Kivy        ] v1.10.1

[INFO   ] [Python      ] v2.7.10 (default, Jul 15 2017, 17:16:57) 

[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)]

[INFO   ] [Factory     ] 194 symbols loaded

[INFO   ] [Image       ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)

[INFO   ] [Text        ] Provider: sdl2

[INFO   ] [Window      ] Provider: sdl2

[CRITICAL] [Window      ] Unable to find any valuable Window provider.

sdl2 - RuntimeError: Failed creating OpenGL pixel format

  File "/Library/Python/2.7/site-packages/kivy/core/__init__.py", line 67, in core_select_lib

    cls = cls()

  File "/Library/Python/2.7/site-packages/kivy/core/window/window_sdl2.py", line 140, in __init__

    super(WindowSDL, self).__init__()

  File "/Library/Python/2.7/site-packages/kivy/core/window/__init__.py", line 968, in __init__

    self.create_window()

  File "/Library/Python/2.7/site-packages/kivy/core/window/window_sdl2.py", line 272, in create_window

    self.fullscreen, resizable, state)

  File "kivy/core/window/_window_sdl2.pyx", line 217, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window

  File "kivy/core/window/_window_sdl2.pyx", line 66, in kivy.core.window._window_sdl2._WindowSDL2Storage.die


[CRITICAL] [App         ] Unable to get a Window, abort.


Here is the trivial program that works fine on other os's



from kivy.uix.label import Label

from kivy.lang import Builder

from kivy.app import App

from kivy.lang import Builder



class tiny(App):

    

    def build(self):

        return Label(text="hello there")


if __name__ == '__main__':

    tiny().run()


Leonard Gross

unread,
Oct 24, 2018, 9:11:16 PM10/24/18
to Kivy users support
Solved.  Well the right way to get it running is actually in the documentation, with a few caveats.
Since I had used PyCharm successfully in Windows (I don't think I used it on Linux)  it seemed like that might be a good approach on Mac.
But, I couldn't  load the required packages into PyCharm.  Googling for the error "no valuable window provider"
sent me on the proverbial wild goose chase.  Then I looked in the docs and it seems you have to launch
using  the kivy app.  However, the presence of PyCharm seemed to mess up the launch of the dmg. It kept
telling me to drag PyCharm to the Kivy app.  which isn't what was supposed to happen.   So, I deleted PyCharm
and then I got the correct screen which had (among other things) the makesymlinks button.  
Now dragging "tiny_test" to kivy app runs correctly.

With Kivy you have to enjoy the journey.

--Len
Reply all
Reply to author
Forward
0 new messages