hello,
I'm not able to get a Window for Kivy running from the console on Raspberry Pi 4. (have done this lots on the older Raspberry Pi)
at present, this is the error i am getting.
[CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
sdl2 - ImportError: /usr/local/lib/libSDL2_mixer-2.0.so.0: undefined symbol: SDL_RWread
File "/home/pi/.local/lib/python3.7/site-packages/kivy/core/__init__.py", line 62, in core_select_lib
fromlist=[modulename], level=0)
File "/home/pi/.local/lib/python3.7/site-packages/kivy/core/window/window_sdl2.py", line 27, in <module>
from kivy.core.window._window_sdl2 import _WindowSDL2Storage
I started this fresh today with the Feb 2020 download of Raspbian Desktop ( though I am not using the Desktop)
I followed the directions here:
and I do understand that the sdl2 should not be installed with apt because there are steps in those instructions to compile it.
The exact Kivy installation line that i used is :
that last step of installing Kivy was the most confusing step for me. There are so many ways to do this but my understanding is that I could not rely on the wheels at piwheels at this time.
I found most of the information i am using by starting here:
and in that conversation it is implied and suggested that Kivy has been updated for this problem. I do have one specific question - and that is could I install Kivy 1.11.1 instead of 2.0.0release candidate? My understanding was that I could not since only the current master branch has the fix for getting a Window - but since that did not work for me I must still wonder.
Any thoughts? thanks!
this is the test code I am using
#
import os
os.environ["KIVY_WINDOW"] = "sdl2"
os.environ["KIVY_GL_BACKEND"] = "sdl2"
import kivy
kivy.require("2.0.0")
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text='Hello world')
if __name__ == '__main__':
MyApp().run()