I Can't create a window in pyglet

Viewed 265

I have just installed pyglet on my machine. But I can't seem to create a window

here's what I tried

import pyglet 

window = pyglet.window.Window()

pyglet.app.run()

and it gives me this error when I run

Traceback (most recent call last):
  File "c:/Users/Public/Documents/vscode/python/Games/Pyglet/main.py", line 3, in <module>
    window = pyglet.window.Window()
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pyglet\window\win32\__init__.py", line 132, in __init__
    super(Win32Window, self).__init__(*args, **kwargs)
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pyglet\window\__init__.py", line 648, in __init__
    self._create()
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pyglet\window\win32\__init__.py", line 274, in _create
    self.context.attach(self.canvas)
  File "C:\Users\DELL\AppData\Roaming\Python\Python38\site-packages\pyglet\gl\win32.py", line 238, in attach
    raise gl.ContextException('Unable to share contexts.')
pyglet.gl.ContextException: Unable to share contexts.
0 Answers
Related