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 starting example hello world file (Initial Setup) #820

Closed
yfedberts opened this issue Jun 18, 2020 · 4 comments
Closed

Error starting example hello world file (Initial Setup) #820

yfedberts opened this issue Jun 18, 2020 · 4 comments
Assignees

Comments

@yfedberts
Copy link

yfedberts commented Jun 18, 2020

I've installed MediaPipe on Ubuntu 20.04 based on the instructions given by the MediaPipe team, though when I try to run the example I keep receiving the following error:

Error

ERROR: Analysis of target '//mediapipe/examples/desktop/hello_world:hello_world' failed; build aborted: Traceback (most recent call last):
 File "/root/.cache/bazel/_bazel_root/6be9f6de2f9f4c6f3d41746e8583a46a/external/org_tensorflow/third_party/py/python_configure.bzl", line 208
  get_python_bin(repository_ctx)
 File "/root/.cache/bazel/_bazel_root/6be9f6de2f9f4c6f3d41746e8583a46a/external/org_tensorflow/third_party/remote_config/common.bzl", line 44, in get_python_bin
  which(repository_ctx, "python")
 File "/root/.cache/bazel/_bazel_root/6be9f6de2f9f4c6f3d41746e8583a46a/external/org_tensorflow/third_party/remote_config/common.bzl", line 29, in which
  execute(repository_ctx, <1 more arguments>)
 File "/root/.cache/bazel/_bazel_root/6be9f6de2f9f4c6f3d41746e8583a46a/external/org_tensorflow/third_party/remote_config/common.bzl", line 208, in execute
  fail(<1 more arguments>)
Repository command failed

I have tried reinstalling python and the entire ubuntu system but still no luck...

I'm running Ubuntu 20.04 on a VM using VirtualBox if that helps(?)

@jiuqiant
Copy link
Contributor

Seems like Bazel doesn't find the python binary. You can add --action_env PYTHON_BIN_PATH=<path> to specify where it is.

For example, we have a similar issue on native Windows and we solved it by running

C:\Users\Username\mediapipe_repo>bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C:/python_36/python.exe" mediapipe/examples/desktop/hello_world

See more details at https://google.github.io/mediapipe/getting_started/install#installing-on-windows

@yfedberts
Copy link
Author

yfedberts commented Jun 19, 2020

Thanks for the swift response @jiuqiant , that seems to have solved one problem and now I've come across two other problem with the following error:

bazel run -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="/usr/bin/python3.8" mediapipe/examples/desktop/hello_world:hello_world
DEBUG: Rule 'rules_cc' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "a07fc8b90c22e42962142504438a84b31567976adcd9ee1a4c9f75d2e3396f8d"
DEBUG: Repository rules_cc instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
  /home/edbert/.cache/bazel/_bazel_edbert/6be9f6de2f9f4c6f3d41746e8583a46a/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Analyzed target //mediapipe/examples/desktop/hello_world:hello_world (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //mediapipe/examples/desktop/hello_world:hello_world up-to-date:
  bazel-bin/mediapipe/examples/desktop/hello_world/hello_world
INFO: Elapsed time: 0.413s, Critical Path: 0.01s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
Segmentation fault (core dumped)

I've also received the following error on top of the previous one:

INFO: From ProtoCompile mediapipe/calculators/internal/callback_packet_calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/calculator_profile.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.
INFO: From ProtoCompile mediapipe/framework/tool/calculator_graph_template.pb.h:
bazel-out/k8-opt/bin/external/com_google_protobuf/src: warning: directory does not exist.

@jiuqiant
Copy link
Contributor

Seems like MP is not 100% ready for supporting Ubuntu 20.04 LTS.
See the workaround at #816 (comment).

@jiuqiant jiuqiant self-assigned this Jun 19, 2020
@jiuqiant
Copy link
Contributor

jiuqiant commented Jul 9, 2020

The fix is released in e9fbe86.

@jiuqiant jiuqiant closed this as completed Jul 9, 2020
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

2 participants