mujoco-py icon indicating copy to clipboard operation
mujoco-py copied to clipboard

Issue when importing mujoco_py (crypt.h: No such file or directory)

Open jayaramreddy10 opened this issue 8 months ago • 0 comments

Describe the bug Hi, I installed mujoco_py using pip (pip3 install -U 'mujoco-py<2.2,>=2.1') but when trying to import, I am getting error message.

Error Messages

import mujoco_py In file included from /home/jayaram/.mujoco/mujoco-py/mujoco_py/cymj.c:57: /home/jayaram/miniconda3/envs/psl2/include/python3.8/Python.h:44:10: fatal error: crypt.h: No such file or directory 44 | #include <crypt.h> | ^~~~~~~~~ compilation terminated. Traceback (most recent call last): File "/home/jayaram/miniconda3/envs/psl2/lib/python3.8/site-packages/setuptools/_distutils/unixccompiler.py", line 188, in _compile self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) File "/home/jayaram/miniconda3/envs/psl2/lib/python3.8/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) File "/home/jayaram/miniconda3/envs/psl2/lib/python3.8/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 '/home/jayaram/miniconda3/envs/psl2/bin/gcc' failed with exit code 1

Desktop (please complete the following information):

  • OS: [Ubuntu 22.04]
  • Python Version [e.g. 3.8]
  • Mujoco Version [e.g. 2.3.5]

Mujoco is working fine, able to run the examples.

Did I miss anything? Please let me know if any other details are required?

jayaramreddy10 avatar Jun 14 '24 11:06 jayaramreddy10