google-deepmind / language_to_reward_2023

Apache License 2.0
110 stars 14 forks source link

pip install failed #1

Open leo-liuzy opened 11 months ago

leo-liuzy commented 11 months ago
make[1]: *** [CMakeFiles/Makefile2:6805: mjpc/grpc/CMakeFiles/agent_server.dir/rule] Error 2
      make: *** [Makefile:1916: agent_server] Error 2
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/zliu/mujoco_mpc/python/setup.py", line 256, in <module>
          setuptools.setup(
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 369, in run
          self.run_command("build")
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/zliu/mujoco_mpc/python/setup.py", line 199, in run
          self._configure_and_build_agent_server()
        File "/home/zliu/mujoco_mpc/python/setup.py", line 240, in _configure_and_build_agent_server
          subprocess.check_call(
        File "/home/zliu/miniconda3/envs/t2r/lib/python3.9/subprocess.py", line 373, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '/home/zliu/mujoco_mpc/build', '--target', 'agent_server', 'ui_agent_server', '-j28', '--config', 'Debug']' returned non-zero exit status 2.
      [end of output]

The machine is on an Ubuntu 20.04

I also try to follow GitHub issues on mjpc repo, but I am still not able to install the python interface.

qianqianlo commented 11 months ago

Same problem. @leo-liuzy have you solved this issue?

fxia22 commented 11 months ago

It seems the error message is buried one level deeper, can you show the full error log?

qianqianlo commented 11 months ago

@fxia22 the full log contains the build process and it's quite long. I put it in a shared google doc: link

yichaoshen-MS commented 9 months ago

It seems the error message is buried one level deeper, can you show the full error log?

I find the same error.

fxia22 commented 9 months ago

Seems the root cause is

/home/user/project/mujoco_mpc/mjpc/tasks/humanoid/tracking/tracking.cc: In member function 'virtual void mjpc::humanoid::Tracking::TransitionLocked(mjModel*, mjData*)':
      /home/user/project/mujoco_mpc/mjpc/tasks/humanoid/tracking/tracking.cc:253:3: error: 'mjMARKSTACK' was not declared in this scope
        253 |   mjMARKSTACK;
            |   ^~~~~~~~~~~
      [ 83%] Building CXX object _deps/grpc-build/CMakeFiles/grpc.dir/src/core/lib/iomgr/cfstream_handle.cc.o
      /home/user/project/mujoco_mpc/mjpc/tasks/humanoid/tracking/tracking.cc:255:25: error: 'mj_stackAlloc' was not declared in this scope; did you mean 'mj_stackAllocNum'?
        255 |   mjtNum *mocap_pos_0 = mj_stackAlloc(d, 3 * model->nmocap);
            |                         ^~~~~~~~~~~~~
            |                         mj_stackAllocNum
      /home/user/project/mujoco_mpc/mjpc/tasks/humanoid/tracking/tracking.cc:268:3: error: 'mjFREESTACK' was not declared in this scope
        268 |   mjFREESTACK;
            |   ^~~~~~~~~~~

but it seems a bit weird, since it should be fixed it here https://github.com/google-deepmind/mujoco_mpc/commit/74763c51624d9e9a61027e5eeb68d0affc097992

fxia22 commented 9 months ago

could you try upgrading mujoco_mpc to the latest version?

doldam0 commented 8 months ago

Could you try removing build directory?

SebastienJin commented 6 months ago

I have the same problem and it's solved by updating the version of clang.

saloneeverma commented 5 months ago

Has anyone else solved this issue just by updating the version of clang? It didn't work for me; none of the other suggestions worked either.

nimrod-gileadi commented 2 months ago

Could you confirm that you are following the installation instructions in the README exactly (including checking out the particular commit of mujoco_mpc, where we tested the build)?