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

Error when running the four environment files of multi-agent-emergence-environments #44

Open
aslansd opened this issue Apr 12, 2022 · 0 comments

Comments

@aslansd
Copy link

aslansd commented Apr 12, 2022

I encounter the follwoing error when I want to run the four environments in "/multi-agent-emergence-environments-master/mae_envs/envs" folder:

running build_ext
building 'mujoco_py.cymj' extension
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Imujoco-py-1.50.1.0/mujoco_py -I/notebooks/mujoco-py-1.50.1.0/mujoco_py -Inotebooks/mujoco/mjpro150/include -I/usr/local/lib/python3.8/dist-packages/numpy/core/include -I/usr/include/python3.8 -c /notebooks/mujoco-py-1.50.1.0/mujoco_py/cymj.c -o /notebooks/mujoco-py-1.50.1.0/mujoco_py/generated/_pyxbld_LinuxCPUExtensionBuilder/temp.linux-x86_64-3.8/notebooks/mujoco-py-1.50.1.0/mujoco_py/cymj.o -fopenmp -w
/notebooks/mujoco-py-1.50.1.0/mujoco_py/cymj.c:666:10: fatal error: mjmodel.h: No such file or directory
666 | #include "mjmodel.h"
| ^~~~~~~~~~~
compilation terminated.
Traceback (most recent call last):
File "/usr/lib/python3.8/distutils/unixccompiler.py", line 117, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/usr/lib/python3.8/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/usr/lib/python3.8/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/usr/lib/python3.8/distutils/spawn.py", line 157, in _spawn_posix
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "multi-agent-emergence-environments-master/mae_envs/envs/blueprint_construction.py", line 5, in
from mae_envs.wrappers.util import (DiscretizeActionWrapper, MaskActionWrapper,
File "/notebooks/multi-agent-emergence-environments-master/mae_envs/wrappers/util.py", line 2, in
from mujoco_py import MujocoException
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/init.py", line 1, in
from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/builder.py", line 283, in
cymj = load_cython_ext(mjpro_path)
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/builder.py", line 54, in load_cython_ext
cext_so_path = builder.build()
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/builder.py", line 131, in build
dist.run_commands()
File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/local/lib/python3.8/dist-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/notebooks/mujoco-py-1.50.1.0/mujoco_py/builder.py", line 75, in build_extensions
build_ext.build_extensions(self)
File "/usr/local/lib/python3.8/dist-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/usr/lib/python3.8/distutils/command/build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "/usr/lib/python3.8/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/usr/lib/python3.8/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'x86_64-linux-gnu-gcc' failed with exit status 1

"mjmodel.h" is already in "/mujoco/mjpro/include/mjmodel.h". So my question is that most probably the environment files or more specifically "cymj.c" is not able to find "mjmodel.h" due to some problem in installation, or is there any other reason? Thanks!

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

1 participant