google-deepmind / language_to_reward_2023

Apache License 2.0
101 stars 15 forks source link

Could not build wheel when running `pip install ./python` #4

Open hhhsu-cmlab opened 5 months ago

hhhsu-cmlab commented 5 months ago

I met the following error when running the command shown in title:

pip install ./python
Processing ./python
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting grpcio (from mujoco_mpc==0.1.0)
  Obtaining dependency information for grpcio from https://files.pythonhosted.org/packages/71/fd/28fd4a325797e423f453c3718b08bb34e3aeb11801972eb3cbf6911b8630/grpcio-1.62.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached grpcio-1.62.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.0 kB)
Collecting mujoco>=2.3.3 (from mujoco_mpc==0.1.0)
  Obtaining dependency information for mujoco>=2.3.3 from https://files.pythonhosted.org/packages/f6/67/563b4755fd77a898cda35f448d4f8f5f062932965d7833de75287451ffcd/mujoco-3.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Using cached mujoco-3.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (44 kB)
Collecting protobuf (from mujoco_mpc==0.1.0)
  Obtaining dependency information for protobuf from https://files.pythonhosted.org/packages/2c/2a/d2741cad35fa5f06d9c59dda3274e5727ca11075dfd7de3f69c100efdcad/protobuf-5.26.1-cp37-abi3-manylinux2014_x86_64.whl.metadata
  Using cached protobuf-5.26.1-cp37-abi3-manylinux2014_x86_64.whl.metadata (592 bytes)
Collecting absl-py (from mujoco>=2.3.3->mujoco_mpc==0.1.0)
  Obtaining dependency information for absl-py from https://files.pythonhosted.org/packages/a2/ad/e0d3c824784ff121c03cc031f944bc7e139a8f1870ffd2845cc2dd76f6c4/absl_py-2.1.0-py3-none-any.whl.metadata
  Using cached absl_py-2.1.0-py3-none-any.whl.metadata (2.3 kB)
Collecting etils[epath] (from mujoco>=2.3.3->mujoco_mpc==0.1.0)
  Obtaining dependency information for etils[epath] from https://files.pythonhosted.org/packages/d0/3c/784b5f94bcad62a4167f2347fe1095b627433c22a54aecc4504237494b81/etils-1.8.0-py3-none-any.whl.metadata
  Using cached etils-1.8.0-py3-none-any.whl.metadata (6.4 kB)
Requirement already satisfied: glfw in /tmp/12r/lib/python3.11/site-packages (from mujoco>=2.3.3->mujoco_mpc==0.1.0) (2.7.0)
Requirement already satisfied: numpy in /tmp/12r/lib/python3.11/site-packages (from mujoco>=2.3.3->mujoco_mpc==0.1.0) (1.26.4)
Collecting pyopengl (from mujoco>=2.3.3->mujoco_mpc==0.1.0)
  Obtaining dependency information for pyopengl from https://files.pythonhosted.org/packages/99/48/00e31747821d3fc56faddd00a4725454d1e694a8b67d715cf20f531506a5/PyOpenGL-3.1.7-py3-none-any.whl.metadata
  Using cached PyOpenGL-3.1.7-py3-none-any.whl.metadata (3.2 kB)
Collecting fsspec (from etils[epath]->mujoco>=2.3.3->mujoco_mpc==0.1.0)
  Obtaining dependency information for fsspec from https://files.pythonhosted.org/packages/93/6d/66d48b03460768f523da62a57a7e14e5e95fdf339d79e996ce3cecda2cdb/fsspec-2024.3.1-py3-none-any.whl.metadata
  Using cached fsspec-2024.3.1-py3-none-any.whl.metadata (6.8 kB)
Collecting importlib_resources (from etils[epath]->mujoco>=2.3.3->mujoco_mpc==0.1.0)
  Obtaining dependency information for importlib_resources from https://files.pythonhosted.org/packages/75/06/4df55e1b7b112d183f65db9503bff189e97179b256e1ea450a3c365241e0/importlib_resources-6.4.0-py3-none-any.whl.metadata
  Using cached importlib_resources-6.4.0-py3-none-any.whl.metadata (3.9 kB)
Collecting typing_extensions (from etils[epath]->mujoco>=2.3.3->mujoco_mpc==0.1.0)
  Obtaining dependency information for typing_extensions from https://files.pythonhosted.org/packages/f9/de/dc04a3ea60b22624b51c703a84bbe0184abcd1d0b9bc8074b5d6b7ab90bb/typing_extensions-4.10.0-py3-none-any.whl.metadata
  Using cached typing_extensions-4.10.0-py3-none-any.whl.metadata (3.0 kB)
Collecting zipp (from etils[epath]->mujoco>=2.3.3->mujoco_mpc==0.1.0)
  Obtaining dependency information for zipp from https://files.pythonhosted.org/packages/c2/0a/ba9d0ee9536d3ef73a3448e931776e658b36f128d344e175bc32b092a8bf/zipp-3.18.1-py3-none-any.whl.metadata
  Using cached zipp-3.18.1-py3-none-any.whl.metadata (3.5 kB)
Using cached mujoco-3.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.4 MB)
Using cached grpcio-1.62.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB)
Using cached protobuf-5.26.1-cp37-abi3-manylinux2014_x86_64.whl (302 kB)
Using cached absl_py-2.1.0-py3-none-any.whl (133 kB)
Using cached PyOpenGL-3.1.7-py3-none-any.whl (2.4 MB)
Using cached etils-1.8.0-py3-none-any.whl (156 kB)
Using cached fsspec-2024.3.1-py3-none-any.whl (171 kB)
Using cached importlib_resources-6.4.0-py3-none-any.whl (38 kB)
Using cached typing_extensions-4.10.0-py3-none-any.whl (33 kB)
Using cached zipp-3.18.1-py3-none-any.whl (8.2 kB)
Building wheels for collected packages: mujoco_mpc
  Building wheel for mujoco_mpc (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for mujoco_mpc (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      running bdist_wheel
      running build
      running build_py
      running generate_proto_grpc
      touch /home/hanyuan/Desktop/mujoco_mpc/python/build/lib.linux-x86_64-cpython-311/mujoco_mpc/proto/__init__.py
      running copy_task_assets
      copying mujoco_mpc/mjpc_parameters.py -> build/lib.linux-x86_64-cpython-311/mujoco_mpc
      copying mujoco_mpc/agent.py -> build/lib.linux-x86_64-cpython-311/mujoco_mpc
      copying mujoco_mpc/__init__.py -> build/lib.linux-x86_64-cpython-311/mujoco_mpc
      copying mujoco_mpc/filter.py -> build/lib.linux-x86_64-cpython-311/mujoco_mpc
      copying mujoco_mpc/agent_test.py -> build/lib.linux-x86_64-cpython-311/mujoco_mpc
      copying mujoco_mpc/direct_test.py -> build/lib.linux-x86_64-cpython-311/mujoco_mpc
      copying mujoco_mpc/direct.py -> build/lib.linux-x86_64-cpython-311/mujoco_mpc
      copying mujoco_mpc/ui_agent_test.py -> build/lib.linux-x86_64-cpython-311/mujoco_mpc
      copying mujoco_mpc/filter_test.py -> build/lib.linux-x86_64-cpython-311/mujoco_mpc
      running build_ext
      Configuring CMake with the following arguments:
        -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
        -DCMAKE_BUILD_TYPE:STRING=Debug
        -DBUILD_TESTING:BOOL=OFF
        -DMJPC_BUILD_GRPC_SERVICE:BOOL=ON
      error: [Errno 2] No such file or directory: 'cmake'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mujoco_mpc
Failed to build mujoco_mpc
ERROR: Could not build wheels for mujoco_mpc, which is required to install pyproject.toml-based projects

It seems to be unable to find cmake, but the cmake folder in the mujoco_mpc folder is present. My operating system is Ubuntu 20.04.

saloneeverma commented 4 months ago

I am having the same issue - has anyone been able to solve it yet?

nimrod-gileadi commented 1 month ago

Could you add -v to the pip install command and paste the full logs?

Could you tell us what platform you're working in (mac or linux, version), and confirm that you are following the instructions in the README exactly (with the venv)?