Kivy does not detect OpenGL 2.0 [closed]
On windows 7 pro 32bit adding Config.set('graphics', 'multisamples', '0')
solved the error for me. (Update: This is also works on Windows 10.)
import kivy kivy.require('1.9.1') # replace with your current kivy version !from kivy.app import Appfrom kivy.uix.label import Label# add the following 2 lines to solve OpenGL 2.0 bugfrom kivy import ConfigConfig.set('graphics', 'multisamples', '0')class MyApp(App): def build(self): return Label(text='Hello world')if __name__ == '__main__': MyApp().run()
After the change, the OpenGL version is reported correctly:
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] OpenGL version <2.1.0 - Build 8.15.10.2281>
I use Python 3.6 and Windows 8.1. Works on Windows 10 also.
this solution solve the problem in most cases :
.
1. Right click on This PC then open Properties .
2. Go to Advanced system settings .
3. Click on Environment Variables .
4. Click on New in User variables for --- .
5. Put KIVY_GL_BACKEND in Variable name .
6. Put angle_sdl2 in Variable value .
7. Restart Python .
Here is a YouTube video showing these steps :https://www.youtube.com/watch?v=ATK9w2AiDeM