maxspahn / gym_envs_planar

Planar gym environments
7 stars 4 forks source link

Library GLU missing in some installations #34

Open maxspahn opened 2 years ago

maxspahn commented 2 years ago

Traceback (most recent call last): File "/home/nagrawal/.cache/pypoetry/virtualenvs/plannerbenchmark-nPaI4okZ-py3.8/lib/python3.8/site-packages/gym/envs/classic_control/rendering.py", line 27, in from pyglet.gl import File "/home/nagrawal/.cache/pypoetry/virtualenvs/plannerbenchmark-nPaI4okZ-py3.8/lib/python3.8/site-packages/pyglet/gl/init.py", line 95, in from pyglet.gl.gl import File "/home/nagrawal/.cache/pypoetry/virtualenvs/plannerbenchmark-nPaI4okZ-py3.8/lib/python3.8/site-packages/pyglet/gl/gl.py", line 45, in from pyglet.gl.lib import link_GL as _link_function File "/home/nagrawal/.cache/pypoetry/virtualenvs/plannerbenchmark-nPaI4okZ-py3.8/lib/python3.8/site-packages/pyglet/gl/lib.py", line 149, in from pyglet.gl.lib_glx import link_GL, link_GLU, link_GLX File "/home/nagrawal/.cache/pypoetry/virtualenvs/plannerbenchmark-nPaI4okZ-py3.8/lib/python3.8/site-packages/pyglet/gl/lib_glx.py", line 46, in glu_lib = pyglet.lib.load_library('GLU') File "/home/nagrawal/.cache/pypoetry/virtualenvs/plannerbenchmark-nPaI4okZ-py3.8/lib/python3.8/site-packages/pyglet/lib.py", line 164, in load_library raise ImportError('Library "%s" not found.' % names[0]) ImportError: Library "GLU" not found.

maxspahn commented 2 years ago

It seems like installing sudo apt instal libgl1-mesa-dev freeglut3 solvers the problem. However, I am not able to reproduce this issue in a docker, so it is hard to tell.

maxspahn commented 2 years ago

There are multiple threads in openai-gym: https://github.com/openai/gym/issues/2478 https://stackoverflow.com/questions/40195740/how-to-run-openai-gym-render-over-a-server

maxspahn commented 2 years ago

A known fix to this problem is sudo apt install python-opengl