mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Error in building mediapipe aar on Windows

Open nurshafiza opened this issue 3 years ago • 3 comments

Hi. I'm trying to build mediapipe aar on Windows for face detection but I faced this issue which I'm not sure the solution for this. can anyone give a help?

Command that i run: bazel build //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example:mediapipe_face_detection

Error that i got: DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_benchmark' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'flatbuffers' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_googlesource_code_re2' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'zlib' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'build_bazel_apple_support' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'xctestrunner' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11' because it already exists. INFO: Repository local_execution_config_python instantiated at: C:/users/user/mediapipe_repo/mediapipe/WORKSPACE:476:14: in <toplevel> C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/tensorflow/workspace2.bzl:879:19: in workspace C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/tensorflow/workspace2.bzl:86:27: in _tf_toolchains C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/tensorflow/tools/toolchains/remote_config/configs.bzl:6:28: in initialize_rbe_configs C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/tensorflow/tools/toolchains/remote_config/rbe_config.bzl:158:27: in _tensorflow_local_config Repository rule local_python_configure defined at: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl:279:41: in <toplevel> ERROR: An error occurred during the fetch of repository 'local_execution_config_python': Traceback (most recent call last): File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl", line 212, column 22, in _create_local_python_repository _check_python_bin(repository_ctx, python_bin) File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl", line 143, column 52, in _check_python_bin result = raw_exec(repository_ctx, [get_bash_bin(repository_ctx), "-c", cmd]) File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 88, column 26, in get_bash_bin bash_bin_path = which(repository_ctx, "bash") File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 27, column 22, in which out = execute( File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 230, column 13, in execute fail( Error in fail: Repository command failed INFO: Could not find files for the given pattern(s). ERROR: C:/users/user/mediapipe_repo/mediapipe/WORKSPACE:476:14: fetching local_python_configure rule //external:local_execution_config_python: Traceback (most recent call last): File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl", line 212, column 22, in _create_local_python_repository _check_python_bin(repository_ctx, python_bin) File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl", line 143, column 52, in _check_python_bin result = raw_exec(repository_ctx, [get_bash_bin(repository_ctx), "-c", cmd]) File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 88, column 26, in get_bash_bin bash_bin_path = which(repository_ctx, "bash") File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 27, column 22, in which out = execute( File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 230, column 13, in execute fail( Error in fail: Repository command failed INFO: Could not find files for the given pattern(s). ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example:mediapipe_face_detection' failed; build aborted: Repository command failed INFO: Could not find files for the given pattern(s). INFO: Elapsed time: 1.621s INFO: 0 processes. FAILED: Build did NOT complete successfully (39 packages loaded, 13 targets config\ ured)

nurshafiza avatar Sep 20 '22 02:09 nurshafiza

Hi @nurshafiza, Error: Could not find files for the given pattern(s) might be because of the latest release 0.8.11, *tflite model files and other large binaries from Github repo has moved to Google Cloud Storage as mentioned in the release note. Could you please update the python file download_utils.py and let us know if encountering the same error.

Thank you!

kuaashish avatar Sep 20 '22 06:09 kuaashish

I've updated the python file download_utils.py but the error occur is still same

Error: DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_benchmark' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'flatbuffers' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_googlesource_code_re2' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'zlib' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'build_bazel_apple_support' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'xctestrunner' because it already exists. DEBUG: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/repo.bzl:132:14: Warning: skipping import of repository 'pybind11' because it already exists. INFO: Repository local_execution_config_python instantiated at: C:/users/user/mediapipe_repo/mediapipe/WORKSPACE:476:14: in <toplevel> C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/tensorflow/workspace2.bzl:879:19: in workspace C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/tensorflow/workspace2.bzl:86:27: in _tf_toolchains C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/tensorflow/tools/toolchains/remote_config/configs.bzl:6:28: in initialize_rbe_configs C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/tensorflow/tools/toolchains/remote_config/rbe_config.bzl:158:27: in _tensorflow_local_config Repository rule local_python_configure defined at: C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl:279:41: in <toplevel> ERROR: An error occurred during the fetch of repository 'local_execution_config_python': Traceback (most recent call last): File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl", line 212, column 22, in _create_local_python_repository _check_python_bin(repository_ctx, python_bin) File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl", line 143, column 52, in _check_python_bin result = raw_exec(repository_ctx, [get_bash_bin(repository_ctx), "-c", cmd]) File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 88, column 26, in get_bash_bin bash_bin_path = which(repository_ctx, "bash") File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 27, column 22, in which out = execute( File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 230, column 13, in execute fail( Error in fail: Repository command failed INFO: Could not find files for the given pattern(s). ERROR: C:/users/user/mediapipe_repo/mediapipe/WORKSPACE:476:14: fetching local_python_configure rule //external:local_execution_config_python: Traceback (most recent call last): File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl", line 212, column 22, in _create_local_python_repository _check_python_bin(repository_ctx, python_bin) File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/py/python_configure.bzl", line 143, column 52, in _check_python_bin result = raw_exec(repository_ctx, [get_bash_bin(repository_ctx), "-c", cmd]) File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 88, column 26, in get_bash_bin bash_bin_path = which(repository_ctx, "bash") File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 27, column 22, in which out = execute( File "C:/users/user/_bazel_user/bkk7hz7b/external/org_tensorflow/third_party/remote_config/common.bzl", line 230, column 13, in execute fail( Error in fail: Repository command failed INFO: Could not find files for the given pattern(s). ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example:mediapipe_face_detection.aar' failed; build aborted: Repository command failed INFO: Could not find files for the given pattern(s). INFO: Elapsed time: 1.426s INFO: 0 processes. FAILED: Build did NOT complete successfully (3 packages loaded, 2 targets configur\ ed)

nurshafiza avatar Sep 20 '22 07:09 nurshafiza

Update: I also have tried to replace the whole mediapipe file that i clone from Github repo with the latest version that you provide above, but same error still occured. can anyone help me with this please?

nurshafiza avatar Sep 21 '22 01:09 nurshafiza

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Sep 22 '22 06:09 google-ml-butler[bot]

Hi @nurshafiza, Could you please confirm that still you are looking for resolution or the issue has been resolved. Thank you!

kuaashish avatar Sep 22 '22 08:09 kuaashish

Hi. Yes, I managed to solve this issue. The problem is with the python binary path and I just keep uninstall and install back Python with latest version and make sure set the correct path under Environment Variables. And also please restart your laptop before you run the command again

nurshafiza avatar Sep 27 '22 02:09 nurshafiza

Hi @nurshafiza, Thanks for the update. The above steps mentioned will definitely help the community. Thank you!

kuaashish avatar Sep 27 '22 05:09 kuaashish