Stack Exchange
Mediapipe installation on Raspberry pi 4b+
During the installation I followed the https://github.com/superuser789/MediaPipe-on-RaspberryPi guide on my Raspberry Pi 4b+ 4gb and running Raspberry Pi OS 32bit. All my packages are up to date.
I ran python3 setup.py gen_protos && python3 setup.py bdist_wheel and got this result:
ERROR: Traceback (most recent call last):
    File "/home/diegos-pi/.cache/bazel/_bazel_diegos-pi/7f3a9a61ae329ba025208f264fd9a815/external/rules_cc/cc/private/rules_impl/compiler_flag.bzl", line 17, column 76, in <toplevel>
        load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain", "use_cpp_toolchain")
Error: file '@bazel_tools//tools/cpp:toolchain_utils.bzl' does not contain symbol 'use_cpp_toolchain' (did you mean 'find_cpp_toolchain'?)
ERROR: While resolving toolchains for target //mediapipe/modules/face_detection:face_detection_short_range_cpu: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '@bazel_tools//tools/cpp': in /home/diegos-pi/.cache/bazel/_bazel_diegos-pi/7f3a9a61ae329ba025208f264fd9a815/external/rules_cc/cc/defs.bzl: Extension file 'cc/private/rules_impl/compiler_flag.bzl' has errors
ERROR: Analysis of target '//mediapipe/modules/face_detection:face_detection_short_range_cpu' failed; build aborted: com.google.devtools.build.lib.packages.BuildFileContainsErrorsException: error loading package '@bazel_tools//tools/cpp': in /home/diegos-pi/.cache/bazel/_bazel_diegos-pi/7f3a9a61ae329ba025208f264fd9a815/external/rules_cc/cc/defs.bzl: Extension file 'cc/private/rules_impl/compiler_flag.bzl' has errors
INFO: Elapsed time: 16.113s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (2 packages loaded, 0 targets conf\
igured)



I also follow this rabbit hole.
Just install via pip the specific module.
With:

pip3 install mediapipe-rpi4==0.8.8

or the other version this repo provides via pip.
The other way in building the own is a painful way, because of many constraints with bazel and Linux.
You could find my issue on GitHub mediapipe, I asked for raspberry pi support, Google wrote they are working on it...
In case working with the mediapipe, use correct OS Version: Buster with 32 Bit, install all dependencies as mentioned. Other things won't work, trust me I tested them...

The problems with building on not offical supported Linux with ARM that many things could happend.
For example using the bazel version must also exactly match with mediapipe version and the OS Version, see for yourself: https://developers.google.com/mediapipe/framework/getting_started/install#installing_on_debian_and_ubuntu
For Raspbian Buster ... one needs to enable in bazel the armhf, but this is not all, I fixed 5 errors and added stuff. Just to get it somehow working: https://developers.google.com/mediapipe/framework/getting_started/install
Better stick to pre compiled solution.
