pyglet.gl.ContextException: Could not create GL context on Python3.4
Works flawlessly with python2, but with python3 this error appears:
> python3 main.py
Traceback (most recent call last):
File "main.py", line 7, in <module>
from pyglet.gl import *
File "/usr/lib/python3.4/site-packages/pyglet/gl/__init__.py", line 236, in <module>
import pyglet.window
File "/usr/lib/python3.4/site-packages/pyglet/window/__init__.py", line 1816, in <module>
gl._create_shadow_window()
File "/usr/lib/python3.4/site-packages/pyglet/gl/__init__.py", line 205, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File "/usr/lib/python3.4/site-packages/pyglet/window/xlib/__init__.py", line 163, in __init__
super(XlibWindow, self).__init__(*args, **kwargs)
File "/usr/lib/python3.4/site-packages/pyglet/window/__init__.py", line 515, in __init__
context = config.create_context(gl.current_context)
File "/usr/lib/python3.4/site-packages/pyglet/gl/xlib.py", line 186, in create_context
return XlibContextARB(self, share)
File "/usr/lib/python3.4/site-packages/pyglet/gl/xlib.py", line 300, in __init__
super(XlibContext13, self).__init__(config, share)
File "/usr/lib/python3.4/site-packages/pyglet/gl/xlib.py", line 203, in __init__
raise gl.ContextException('Could not create GL context')
pyglet.gl.ContextException: Could not create GL context
> uname -a
Linux 3.19.3-3-ARCH #1 SMP PREEMPT Wed Apr 8 14:10:00 CEST 2015 x86_64 GNU/Linux
@phiresky, only guessing, but I assume between py2.7 and py3.x the API for pyglet changed. Honestly at this point, this repository is all but dead. A fork and port to py3 would be beneficial.
@Aareon It works for me on Python3.5.
@phiresky @ProgVal what graphics cards do y’all have? I’ve read some information about Nvidia cards not playing well with Pyglet/GL
Could just be that your card doesn’t support the version of GL that it needs
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)
it doesn't work on python 3.8 know…