[Solved] Kivy widgets doesn't shows up! | Sololearn: Learn to code for FREE!


[Solved] Kivy widgets doesn't shows up!

- Kivy doesn't load any widgets! - In the example code I given, It just shows a black window without the label! This bug came up after fixing: ■ Kivy doesn't detect OpenGL2.0! which is fixed by adding a new environment variable: KIVY_GL_BACKEND = angle_sdl2 My Specs 🖥: Platform 〰️ Windows 10 [64-bit] Interpreter 〰️ Python 3.7.3 & 3.7.7 Graphics 〰️ OpenGL 3.1.0 Code 📟 https://code.sololearn.com/ck2r1DzIRfFD/?ref=app Console log 📃https://code.sololearn.com/cJMszjqnyYGV/?ref=app ⸻⸻⸻⸻⸻⸻⸻⸻ I have posted this thread on many forums⏬ 🐍on Python forum: https://python-forum.io/Thread-Kivy-Kivy-text-label-won-t-shows-up 🔶️on StackOverflow: https://stackoverflow.com/questions/61318824/kivy-text-label-wont-shows-up 🔴on Redit: https://www.reddit.com/r/kivy/comments/geeyyd/kivy_widgets_wont_shows_up/ ⸻⸻⸻⸻⸻⸻⸻⸻ 🆕Edit: Also tried reinstall Python3.7 and reinstalling Kivy following the way recommended by Kivy official doc! ‏‏‎ ‎

5/2/2020 7:22:54 AM


8 Answers

New Answer


After restless troubleshooting I got the solution xD - The issue was due to my old integrated intel-made graphics card, arising conflicts with my os, and kivy! - It was very hard to troubleshoot as Kivy and OpenGL claims to work correctly while the issue is still there! - I should either purchase a new graphics card or try installing unofficial graphics driver if available to make kivy work well in my pc. (credits ~ Snu at kivy discord) Thanks to all for the help!


Rearrange how you import *** import kivy from kivy.uix.label import Label from kivy.app import App **** Then when launching the app, do this if __name__ == "__main__": app = yourApp() app.run()


Basel Al_hajeri.MBH() I've no other way bro 😅


Mirielle || GOAT Now the window doesn't open at all 🤷‍♂️


Abhishek Kumar I think the OP is talking about running kivy on personal computer ( not related to sololearn's playground ) Kivy depends on a lot of other frameworks (including pygame) making them a prerequisite before it can get installed and it must run a certain loop continuously at a specific time interval, so trying to do that on here is a total waste of time


Losing challenges 😕 it is uncommon way here bro


I tried the program and shows up a black window with "Hello kivy" at the center