Unfortunately just importing pyglet causes pyglet to try and load the GLU library. A library that doesn't exist when running headless on ReadTheDocs.
File "/home/docs/checkouts/readthedocs.org/user_builds/arcade/checkouts/latest/arcade/window_commands.py", line 11, in <module>
import pyglet.gl as GL
File "/home/docs/checkouts/readthedocs.org/user_builds/arcade/envs/latest/local/lib/python2.7/site-packages/pyglet/gl/__init__.py", line 97, in <module>
from pyglet.gl.lib import GLException
File "/home/docs/checkouts/readthedocs.org/user_builds/arcade/envs/latest/local/lib/python2.7/site-packages/pyglet/gl/lib.py", line 142, in <module>
from pyglet.gl.lib_glx import link_GL, link_GLU, link_GLX
File "/home/docs/checkouts/readthedocs.org/user_builds/arcade/envs/latest/local/lib/python2.7/site-packages/pyglet/gl/lib_glx.py", line 51, in <module>
glu_lib = pyglet.lib.load_library('GLU')
File "/home/docs/checkouts/readthedocs.org/user_builds/arcade/envs/latest/local/lib/python2.7/site-packages/pyglet/lib.py", line 160, in load_library
raise ImportError('Library "%s" not found.' % names)
Pyglet does some fancy work to get around this in their docs. I've not been successful in replicating it. Has anyone found a simpler way?