我刚刚在我的机器上安装了pyglet。但我似乎无法创建一个窗口
我是这么做的
import pyglet
window = pyglet.window.Window()
pyglet.app.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.
1条答案
按热度按时间kgsdhlau1#
也许这将帮助某人,我在一些论坛搜索了过去2天,似乎有一个问题,英特尔高清4000,它有点打破了小矮人。下面是我找到的解决方案,只需更改“\gl\win32.Py”对于这个:
希望能成功!!