How to run OpenAI Gym .render() over a server
问题 I am running a python 2.7 script on a p2.xlarge AWS server through Jupyter (Ubuntu 14.04). I would like to be able to render my simulations. Minimal working example import gym env = gym.make('CartPole-v0') env.reset() env.render() env.render() makes (among other things) the following errors: ... 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: