0

我正在尝试为 Drake 安装 Python 绑定,但遇到了问题。我已经按照从“Python 的二进制安装”部分到“构建 Python 绑定”的步骤进行操作。我正在运行“make -j”步骤并收到以下错误:

FAILED: Build did NOT complete successfully
make[2]: *** [drake_cxx_python-prefix/src/drake_cxx_python-stamp/drake_cxx_python-build] Error 1
make[1]: *** [CMakeFiles/drake_cxx_python.dir/all] Error 2
make: *** [all] Error 2

输出错误的完整回溯是:

ERROR: /Users/samcherna/Documents/6.832/drake/examples/rimless_wheel/BUILD.bazel:18:1: Action examples/rimless_wheel/gen/rimless_wheel_continuous_state.cc failed (Exit 1) lcm_vector_gen failed: error executing command bazel-out/host/bin/tools/vector_gen/lcm_vector_gen '--src=examples/rimless_wheel/rimless_wheel_continuous_state_named_vector.yaml' '--src=examples/rimless_wheel/rimless_wheel_params_named_vector.yaml' ... (remaining 5 argument(s) skipped)

Use --sandbox_debug to see verbose messages from the sandbox
Traceback (most recent call last):
  File "/Users/samcherna/Documents/6.832/drake-build/_bazel_samcherna/816e2be05e81a09f0a948f564abb1d71/sandbox/darwin-sandbox/43/execroot/drake/bazel-out/host/bin/tools/vector_gen/lcm_vector_gen.runfiles/drake/tools/vector_gen/lcm_vector_gen.py", line 656, in <module>
    main()
  File "/Users/samcherna/Documents/6.832/drake-build/_bazel_samcherna/816e2be05e81a09f0a948f564abb1d71/sandbox/darwin-sandbox/43/execroot/drake/bazel-out/host/bin/tools/vector_gen/lcm_vector_gen.runfiles/drake/tools/vector_gen/lcm_vector_gen.py", line 652, in main
    return generate_all_code(args)
  File "/Users/samcherna/Documents/6.832/drake-build/_bazel_samcherna/816e2be05e81a09f0a948f564abb1d71/sandbox/darwin-sandbox/43/execroot/drake/bazel-out/host/bin/tools/vector_gen/lcm_vector_gen.runfiles/drake/tools/vector_gen/lcm_vector_gen.py", line 632, in generate_all_code
    generate_code(src, **kwargs_for_generate)
  File "/Users/samcherna/Documents/6.832/drake-build/_bazel_samcherna/816e2be05e81a09f0a948f564abb1d71/sandbox/darwin-sandbox/43/execroot/drake/bazel-out/host/bin/tools/vector_gen/lcm_vector_gen.runfiles/drake/tools/vector_gen/lcm_vector_gen.py", line 591, in generate_code
    [get_clang_format_path(), "--style=" + style, "-i"] + cxx_names)
  File "/Users/samcherna/Documents/6.832/drake-build/_bazel_samcherna/816e2be05e81a09f0a948f564abb1d71/sandbox/darwin-sandbox/43/execroot/drake/bazel-out/host/bin/tools/vector_gen/lcm_vector_gen.runfiles/drake/tools/lint/clang_format.py", line 15, in get_clang_format_path
    raise RuntimeError("Could not find required clang-format at " + path)
RuntimeError: Could not find required clang-format at /usr/local/opt/llvm@6/bin/clang-format
----------------
Note: The failure of target //tools/vector_gen:lcm_vector_gen (with exit code 1) may have been caused by the fact that it is running under Python 3 instead of Python 2. Examine the error to determine if that appears to be the problem. Since this target is built in the host configuration, the only way to change its version is to set --host_force_python=PY2, which affects the entire build.

If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See https://github.com/bazelbuild/bazel/issues/7899 for more information.
----------------
Target //:install failed to build
Use --verbose_failures to see the command lines of failed build steps.
ERROR: /Users/samcherna/Documents/6.832/drake/BUILD.bazel:61:1 Action examples/rimless_wheel/gen/rimless_wheel_continuous_state.cc failed (Exit 1) lcm_vector_gen failed: error executing command bazel-out/host/bin/tools/vector_gen/lcm_vector_gen '--src=examples/rimless_wheel/rimless_wheel_continuous_state_named_vector.yaml' '--src=examples/rimless_wheel/rimless_wheel_params_named_vector.yaml' ... (remaining 5 argument(s) skipped)

有没有人对可能导致问题的原因有任何见解?谢谢您的帮助!

4

1 回答 1

1

哎呀。如果您正在执行二进制安装,那么您不需要运行make. 我想你已经过了“Python 的二进制安装”部分,进入了“构建 Python 绑定”?

如果你完成了二进制安装部分,那么你的状态很好!

于 2020-04-23T01:13:25.257 回答