Kivy does not detect OpenGL 2.0

I have decided to do some programming in Kivy cross platform and installed Kivy on my computer successfully. The problem is that when I run my code, I get this error:

[INFO              ] [Kivy        ] v1.9.1
[INFO              ] [Python      ] v3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 20:20:57) [MSC v.1600 64 bit (AMD64)]
[INFO              ] [Factory     ] 179 symbols loaded
[INFO              ] [Image       ] Providers: img_tex, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored)
[INFO              ] [OSC         ] using <thread> for socket
[INFO              ] [Window      ] Provider: sdl2
[INFO              ] [GL          ] GLEW initialization succeeded
[INFO              ] [GL          ] OpenGL version <b'1.1.0'>
[INFO              ] [GL          ] OpenGL vendor <b'Microsoft Corporation'>
[INFO              ] [GL          ] OpenGL renderer <b'GDI Generic'>
[INFO              ] [GL          ] OpenGL parsed version: 1, 1
[CRITICAL          ] [GL          ] Minimum required OpenGL version (2.0) NOT found!

OpenGL version detected: 1.1

Version: b'1.1.0'
Vendor: b'Microsoft Corporation'
Renderer: b'GDI Generic'

Try upgrading your graphics drivers and/or your graphics hardware in case of problems.

The application will leave now.

And this error box pops out:

基维致命错误

I have checked OpenGL version of my GPU via GPU Caps Viewer verifying me up to OpenGL Version 2.1, but Kivy somehow doesn't detect OpenGL 2.1 and defaults to GDI Generic from Microsoft instead. I did some research on internet and found out that best way to resolve this problem is to update your graphical card's driver from your graphical card manufacturer, but this didn't work in my case.

I have updated my graphic drivers (I am running NVIDIA GeForce GT 435M on 64-bit Windows 8).

My question is: Is there a way to let Kivy switch from GDI Generic driver to NVIDIA driver? Or is there a problem somewhere else?


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 App
from kivy.uix.label import Label

# add the following 2 lines to solve OpenGL 2.0 bug
from kivy import Config
Config.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>


Angle backend for py3.5+

pip install kivy.deps.angle 
set KIVY_GL_BACKEND=angle_sdl2

It works perfectly on windows 10 and its solution for above problem. Multisample won't work in my case


This seems to be a known bug in the current version of kivy and is already reported in their issue tracker. So I guess there is no (easy) way to solve this problem. Switching back to an older version might help.

链接地址: http://www.djcxy.com/p/38424.html

上一篇: 如何检测没有上下文的opengl驱动程序版本?

下一篇: Kivy没有检测到OpenGL 2.0