Please help a beginner out: having '_dlopen' issues ('OSError: No such file or directory')


#1

I’ve installed the gym, and try to run this code from the terminal (Python 2.7.14):

>>> import gym
>>> env = gym.make('CartPole-v0')
[2017-12-17 20:20:16,338] Making new env: CartPole-v0
>>> env.reset()
array([ 0.01196688, -0.03579202, -0.04525479, -0.00419392])
>>> env.render()

Then I get the following error:
Traceback (most recent call last):
File “”, line 1, in
File “gym/core.py”, line 150, in render
return self._render(mode=mode, close=close)
File “gym/core.py”, line 286, in _render
return self.env.render(mode, close)
File “gym/core.py”, line 150, in render
return self._render(mode=mode, close=close)
File “gym/envs/classic_control/cartpole.py”, line 115, in _render
from gym.envs.classic_control import rendering
File “gym/envs/classic_control/rendering.py”, line 23, in
from pyglet.gl import *
File “/usr/lib/python2.7/site-packages/pyglet/gl/init.py”, line 100, in
from pyglet.gl.lib import GLException
File “/usr/lib/python2.7/site-packages/pyglet/gl/lib.py”, line 139, in
from pyglet.gl.lib_wgl import link_GL, link_GLU, link_WGL
File “/usr/lib/python2.7/site-packages/pyglet/gl/lib_wgl.py”, line 53, in
gl_lib = ctypes.windll.opengl32
File “/usr/lib/python2.7/ctypes/init.py”, line 436, in getattr
dll = self._dlltype(name)
File “/usr/lib/python2.7/ctypes/init.py”, line 366, in init
self._handle = _dlopen(self._name, mode)
OSError: No such file or directory

What’s gone wrong? Is my ‘_dlopen’ missing? Or ‘self._name’, or ‘mode’?