安装mujoco_py时,最后一步尝试
import mujoco_py
时出现报错
esashim.c:1:10: fatal error: GL/osmesa.h: No such file or directory
1 | #include <GL/osmesa.h>
| ^~~~~~~~~~~~~
compilation terminated.
在https://github.com/openai/mujoco-py#ubuntu-installtion-troubleshooting中有对应解决方法,要安装libosmesa6-dev包,执行
sudo apt install libosmesa6-dev libgl1-mesa-glx libglfw3
但安装libosmesa6-dev时出现问题,提示信息为
The following packages have unmet dependencies:
libosmesa6-dev : Depends: libosmesa6 (= 20.0.8-0ubuntu1~18.04.1) but it is not going to be installed
Depends: mesa-common-dev (= 20.0.8-0ubuntu1~18.04.1) but it is not going to be installed or
libgl-dev
E: Unable to correct problems, you have held brok