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

ERRORS when I run Desktop Helloworld #856

Closed
ZZZhaowendao opened this issue Jun 30, 2020 · 4 comments
Closed

ERRORS when I run Desktop Helloworld #856

ZZZhaowendao opened this issue Jun 30, 2020 · 4 comments
Assignees

Comments

@ZZZhaowendao
Copy link

I completed the requirement configuration according to the instructions of Installing on Debian and Ubuntu
but When running the last command:

$ export GLOG_logtostderr=1
# if you are running on Linux desktop with CPU only
$ bazel run --define MEDIAPIPE_DISABLE_GPU=1 \
    mediapipe/examples/desktop/hello_world:hello_world

Encountered the following error:

Starting local Bazel server and connecting to it...
INFO: SHA256 (https://github.com/bazelbuild/rules_cc/archive/master.zip) = a07fc8b90c22e42962142504438a84b31567976adcd9ee1a4c9f75d2e3396f8d
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/zcw/.cache/bazel/_bazel_zcw/43c4a13803b0469a6bd3b3fd6f82c078/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
INFO: Repository local_execution_config_python instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule local_python_configure defined at:
  /home/zcw/.cache/bazel/_bazel_zcw/43c4a13803b0469a6bd3b3fd6f82c078/external/org_tensorflow/third_party/py/python_configure.bzl:275:26: in <toplevel>
ERROR: An error occurred during the fetch of repository 'local_execution_config_python':
   Traceback (most recent call last):
	File "/home/zcw/.cache/bazel/_bazel_zcw/43c4a13803b0469a6bd3b3fd6f82c078/external/org_tensorflow/third_party/py/python_configure.bzl", line 208
		get_python_bin(repository_ctx)
	File "/home/zcw/.cache/bazel/_bazel_zcw/43c4a13803b0469a6bd3b3fd6f82c078/external/org_tensorflow/third_party/remote_config/common.bzl", line 44, in get_python_bin
		which(repository_ctx, "python")
	File "/home/zcw/.cache/bazel/_bazel_zcw/43c4a13803b0469a6bd3b3fd6f82c078/external/org_tensorflow/third_party/remote_config/common.bzl", line 29, in which
		execute(repository_ctx, <1 more arguments>)
	File "/home/zcw/.cache/bazel/_bazel_zcw/43c4a13803b0469a6bd3b3fd6f82c078/external/org_tensorflow/third_party/remote_config/common.bzl", line 208, in execute
		fail(<1 more arguments>)
Repository command failed

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

INFO: Elapsed time: 13.957s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (9 packages loaded, 11 targets configured)
FAILED: Build did NOT complete successfully (9 packages loaded, 11 targets configured)
    currently loading: @bazel_tools//tools/jdk

Before asking the question, I searched for related issues, but still failed to solve it, so I hope to seek some help :)

@jiuqiant
Copy link
Collaborator

The issue is Bazel doesn't find the local python binary. You can run $ which python to find where the python binary is and then add --action_env PYTHON_BIN_PATH=<path to python binary> to the Bazel command like the following

bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="/path/to/python" mediapipe/examples/desktop/hello_world

@jiuqiant jiuqiant self-assigned this Jun 30, 2020
@ZZZhaowendao
Copy link
Author

Thank you very much.I have followed your method to solve the previous problem.And get the following content:

Starting local Bazel server and connecting to it...
INFO: SHA256 (https://github.com/bazelbuild/rules_cc/archive/master.zip) = a07fc8b90c22e42962142504438a84b31567976adcd9ee1a4c9f75d2e3396f8d
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/zcw/.cache/bazel/_bazel_zcw/43c4a13803b0469a6bd3b3fd6f82c078/external/bazel_tools/tools/build_defs/repo/http.bzl:336:16: in <toplevel>
INFO: Analyzed target //mediapipe/examples/desktop/hello_world:hello_world (52 packages loaded, 1246 targets configured).
INFO: Found 1 target...
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/tool/calculator_graph_template.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.
Target //mediapipe/examples/desktop/hello_world:hello_world up-to-date:
  bazel-bin/mediapipe/examples/desktop/hello_world/hello_world
INFO: Elapsed time: 172.539s, Critical Path: 125.83s
INFO: 455 processes: 455 linux-sandbox.
INFO: Build completed successfully, 471 total actions

Am I successful,but did not print "Hello World" as expected @_@

@jiuqiant
Copy link
Collaborator

jiuqiant commented Jul 1, 2020

You successfully built bazel-bin/mediapipe/examples/desktop/hello_world/hello_world. Then, you need to run it ;)

Try the following:

$ export GLOG_logtostderr=1
$ bazel-bin/mediapipe/examples/desktop/hello_world/hello_world

@jiuqiant jiuqiant closed this as completed Jul 1, 2020
@ZZZhaowendao
Copy link
Author

I make it!Thank you very much for your patience!

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