3

I'm trying to install 'mediapipe' at pyhton3.8.6 on mac m1 big sur 11.3.1

so when I'm trying to install bazel and run 'the Hello World desktop' example.

$ brew search bazel
==> Formulae
bazel ✔   bazelisk  babel     blaze     babeld

$ bazel --version
bazel 4.1.0-homebrew

so I found out ther is no way to downgrade bazel on hmoebrew, but when I run this code,

$ python3 setup.py install --link-opencv
running install
running build_binary_graphs
fail to get bazel version by $ bazel --version: b'\x1b[31mERROR: The project you\'re trying to build requires Bazel 3.7.2 (specified in /Users/san/work/tools/mediapipe/.bazelversion), but it wasn\'t found in /opt/homebrew/Cellar/bazel/4.1.0/libexec/bin.\x1b[0m\n\nBazel binaries for all official releases can be downloaded from here:\n  https://github.com/bazelbuild/bazel/releases\n\nYou can download the required version directly using this command:\n  (cd "/opt/homebrew/Cellar/bazel/4.1.0/libexec/bin" && curl -fLO https://releases.bazel.build/3.7.2/release/bazel-3.7.2-darwin-arm64 && chmod +x bazel-3.7.2-darwin-arm64)\n'%

shortly, it saids me to run

cd "/opt/homebrew/Cellar/bazel/4.1.0/libexec/bin" && curl -fLO https://releases.bazel.build/3.7.2/release/bazel-3.7.2-darwin-arm64 && chmod +x bazel-3.7.2-darwin-arm64

so I run it and,

$ cd "/opt/homebrew/Cellar/bazel/4.1.0/libexec/bin" && curl -fLO https://releases.bazel.build/3.7.2/release/bazel-3.7.2-darwin-arm64 && chmod +x bazel-3.7.2-darwin-arm64
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404

so there is not such file, I tracked the site and I found out there is no 'bazel-3.7.2-darwin-arm64' on https://releases.bazel.build/3.7.2/release/

is there any why to solve it?

San San
  • 101
  • 1
  • 2
  • 6

2 Answers2

1

There are no bazel releases for Apple Silicon before the 4 series ( I think 4.1.0 was the first with M1 support)

The error you are seeing is because the .bazelversion file in the source repo has 3.7.2 in it. Try editing this to be 4.1.0 to get past the error you are seeing.

Note that this will require you to install from the mediapipe source repo and not via pip.

James Sharpe
  • 524
  • 2
  • 8
  • that is the exact problem I stuck in. I already installed 4.1.0. so that's why I saw this error. – San San Jul 21 '21 at 03:36
  • Its the source to mediapipe that has a .bazelversion file in it which has the contents 3.7.2. You need to edit that to 4.1.0 or remove it to use the version of bazel that you have installed. i.e. run ` rm /Users/san/work/tools/mediapipe/.bazelversion` – James Sharpe Jul 21 '21 at 14:03
  • does that actually work, can you install mediapipe if you edit the bazelversion? – aheigins Oct 27 '21 at 18:17
  • Given: https://github.com/google/mediapipe/issues/1514 I would suggest that it doesn't work yet on apple silicon. – James Sharpe Oct 28 '21 at 14:18
1

@James_Sharpe

that is the exact problem I stuck in.

I already installed 4.1.0.

so that's why I saw this error.

fail to get bazel version by 
$ bazel --version: b'\x1b[31mERROR: 
The project you\'re trying to build requires Bazel 3.7.2 
(specified in /Users/san/work/tools/mediapipe/.bazelversion), 
but it wasn\'t found in /opt/homebrew/Cellar/bazel/4.1.0/libexec/bin.\x1b[0m\n\nBazel binaries for 
all official releases can be downloaded from here:\n  
https://github.com/bazelbuild/bazel/releases\n\nYou can download the 
required version directly using this command:\n  
(cd "/opt/homebrew/Cellar/bazel/4.1.0/libexec/bin" && curl -fLO 
https://releases.bazel.build/3.7.2/release/bazel-3.7.2-darwin-arm64 && chmod +x bazel-3.7.2-darwin-arm64)\n'%
San San
  • 101
  • 1
  • 2
  • 6