Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing MuJoCo on CentOS - distutils.errors.CompileError: command 'gcc' failed with exit status 1 #692

Open
ruhanaazam opened this issue Feb 24, 2022 · 2 comments

Comments

@ruhanaazam
Copy link

ruhanaazam commented Feb 24, 2022

Hi, I am trying to get MuJoCo running on a CentOS cluster. I get a compilation error due to missing OpenGL packages. I'm assuming the issue has to do with these packages missing: libosmesa6-dev, libgl1-mesa-glx, libglfw3. Although, CentOS does not support these packages. Does anyone know a way to get Mujoco working on CentOS?

To Reproduce
I have followed the instructions for the setup: downloaded the binaries, placed them in "~/.mujoco/mujoco210", and installed mujoco-py via pip. Then, run import mujoco_py.

Error Messages

/home/$USER/mujoco-py/mujoco_py/gl/osmesashim.c:1:23: fatal error: GL/osmesa.h: No such file or directory
 #include <GL/osmesa.h>

...

During handling of the above exception, another exception occurred:
  File "/home/$USER/miniconda3/envs/phiTrain/lib/python3.7/distutils/unixccompiler.py", line 120, in _compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1

Desktop

  • OS: CentOS 7.9.2009
  • Python Version 3.7.11
  • Mujoco Version 2.1
  • mujoco-py version 2.1.2.14

Environment

  • output of: echo $LD_LIBRARY_PATH: /usr/local/cuda/lib64::/home/$USER/.mujoco/mujoco210/bin
  • output of: echo $HOME : /home/$USER
@dyllanwli
Copy link

Got the same issues on Ubuntu 20.04 LTS, Python 3.8.3, Mujoco Version 2.1 and mujoco-py version 2.1.2.14

@whliu90
Copy link

whliu90 commented Apr 2, 2022

Hello, there! I got the same issues on CentOS 7. I tried this:

conda install -c menpo osmesa
C_INCLUDE_PATH=:$HOME/.conda/envs/<env-name>/include python -c "import mujoco_py"

, then I got an error like "No such file or directory: 'patchelf'". According to #652, I installed
sudo yum install patchelf
,and re-installed mujoco-py with python setup.py install . After that, everything goes right magically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants