---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-24-db1f922459ac> in <module>()
16 # Render into buffer.
17 # You will still see the window.
---> 18 frames.append(env.render(mode = 'rgb_array', close=False))
19 action = env.action_space.sample()
20 observation, reward, done, info = env.step(action)
/usr/local/lib/python3.5/dist-packages/gym/core.py in render(self, mode, close)
148 elif mode not in modes:
149 raise error.UnsupportedMode('Unsupported rendering mode: {}. (Supported modes for {}: {})'.format(mode, self, modes))
--> 150 return self._render(mode=mode, close=close)
151
152 def close(self):
/usr/local/lib/python3.5/dist-packages/gym/core.py in _render(self, mode, close)
284
285 def _render(self, mode='human', close=False):
--> 286 return self.env.render(mode, close)
287
288 def _close(self):
/usr/local/lib/python3.5/dist-packages/gym/core.py in render(self, mode, close)
148 elif mode not in modes:
149 raise error.UnsupportedMode('Unsupported rendering mode: {}. (Supported modes for {}: {})'.format(mode, self, modes))
--> 150 return self._render(mode=mode, close=close)
151
152 def close(self):
/usr/local/lib/python3.5/dist-packages/gym/envs/classic_control/cartpole.py in _render(self, mode, close)
113
114 if self.viewer is None:
--> 115 from gym.envs.classic_control import rendering
116 self.viewer = rendering.Viewer(screen_width, screen_height)
117 l,r,t,b = -cartwidth/2, cartwidth/2, cartheight/2, -cartheight/2
/usr/local/lib/python3.5/dist-packages/gym/envs/classic_control/rendering.py in <module>()
21
22 try:
---> 23 from pyglet.gl import *
24 except ImportError as e:
25 reraise(prefix="Error occured while running `from pyglet.gl import *`",suffix="HINT: make sure you have OpenGL install. On Ubuntu, you can run 'apt-get install python-opengl'. If you're running on a server, you may need a virtual frame buffer; something like this should work: 'xvfb-run -s \"-screen 0 1400x900x24\" python <your_script.py>'")
/usr/local/lib/python3.5/dist-packages/pyglet/gl/__init__.py in <module>()
222 else:
223 from .carbon import CarbonConfig as Config
--> 224 del base
225
226 # XXX remove
NameError: name 'base' is not defined