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

+32

[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

+7

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!

+9

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()

+9

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

+6

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

+4

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

+3

Losing challenges 😕 it is uncommon way here bro

+3

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

-10