安装pyoprngl
python3 -m pip install PyOpenGL PyOpenGL_accelerate
sudo apt-get install python-opengl
bug1
# AttributeError: 'GLXPlatform' object has no attribute 'OSMesa'
解决:
pip install pyrender
export MUJOCO_GL=osmesa
export PYOPENGL_PLATFORM=osmesa
bug2:
# OSError: ('OSMesa: cannot open shared object file: No such file or directory', 'OSMesa', None)
# ImportError: ('Unable to load OpenGL library', 'OSMesa: cannot open shared object file: No such file or directory', 'OSMesa', None)
apt-get install -y python-opengl libosmesa6