openai / mujoco-py

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.
Other
2.89k stars 813 forks source link

Mujoco lglewegl missing, command '/usr/bin/gcc' failed with exit code 1 #801

Open Xinxin-m opened 4 months ago

Xinxin-m commented 4 months ago

Describe the bug I want to run the file download_d4rl_datasets.py from decision-transformer-gym. I downloaded mujoco, and mujoco-py, set it up, and I have the following files in bin:

basic libglfw3.a simulate compile libmujoco210.dylib testspeed derivative libmujoco210nogl.dylib testxml libglfw.3.dylib record

The error message says the following files are missing: -lmujoco210 -lglewegl

I'm using a mac laptop and I have mujoco 2.1. Here's the full error message:

Error Message

Compiling /home/xinmeng/anaconda3/envs/decision-transformer-gym/lib/python3.10/site-packages/mujoco_py/cymj.pyx because it depends on /home/xinmeng/anaconda3/envs/decision-transformer-gym/lib/python3.10/site-packages/mujoco_py/pxd/mujoco.pxd.
[1/1] Cythonizing /home/xinmeng/anaconda3/envs/decision-transformer-gym/lib/python3.10/site-packages/mujoco_py/cymj.pyx
/home/xinmeng/anaconda3/envs/decision-transformer-gym/compiler_compat/ld: cannot find -lmujoco210: No such file or directory
/home/xinmeng/anaconda3/envs/decision-transformer-gym/compiler_compat/ld: cannot find -lglewegl: No such file or directory
collect2: error: ld returned 1 exit status
Traceback (most recent call last):
  File "/home/xinmeng/anaconda3/envs/decision-transformer-gym/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py", line 269, in link
    self.spawn(linker + ld_args)
  File "/home/xinmeng/anaconda3/envs/decision-transformer-gym/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn
    spawn(cmd, dry_run=self.dry_run, **kwargs)
  File "/home/xinmeng/anaconda3/envs/decision-transformer-gym/lib/python3.10/site-packages/setuptools/_distutils/spawn.py", line 68, in spawn
    raise DistutilsExecError(f"command {cmd!r} failed with exit code {exitcode}")
distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1
carolineys commented 4 months ago

same here. did you figure out how to solve it?