Closed NataliaDiaz closed 7 years ago
I suspect the problem is that you don't have a working X11/OpenGL server. The tutorial code calls env.render(mode='rgb_array')
, which imports pyglet.gl
to render an image of the cart into a pixel array. Pyglet doesn't handle missing X11 servers very well.
You might be able to reproduce the crash with:
import pyglet
w=pyglet.window.Window(640, 480)
w.clear()
w.switch_to()
w.dispatch_events()
If you're not running this on a Linux box with a real X11 server, you can run Xdummy
Hi, I get free(): invalid pointer error running both the notebook and reinforcement_q_learning.py of pyTorch tutorials (the kernels dies and restarts, but seems a gym issue (see here):
~/notebooks$ python reinforcement_q_learning.py [2017-04-18 09:24:11,190] Making new env: CartPole-v0 Error in `python': free(): invalid pointer: 0x00007f83611bbae0 Aborted (core dumped)
This is in Ubuntu 14.04 using Python 2.7.