问题描述
我正在尝试在 mac m1 big sur 11.3.1 上的 pyhton3.8.6 上安装“mediapipe”
所以当我尝试安装 bazel 并运行“Hello World 桌面”示例时。
$ brew search bazel
==> Formulae
bazel ✔ bazelisk babel blaze babeld
$ bazel --version
bazel 4.1.0-homebrew
所以我发现无法在 hmoebrew 上降级 bazel,但是当我运行此代码时,
$ 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'%
很快,它说我要跑
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
所以我运行它,
$ 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
所以没有这样的文件,我跟踪了该站点,发现没有 'bazel-3.7.2-darwin-arm64' https://releases.bazel.build/3.7.2/release/
有什么解决方法吗?
解决方法
在 4 系列之前没有 Apple Silicon 的 bazel 版本(我认为 4.1.0
是第一个支持 M1 的)
您看到的错误是因为源存储库中的 .bazelversion
文件中包含 3.7.2
。尝试将其编辑为 4.1.0
以克服您所看到的错误。
请注意,这将要求您从 mediapipe 源代码库安装,而不是通过 pip。
,@James_Sharpe
这正是我遇到的问题。
我已经安装了 4.1.0。
这就是我看到这个错误的原因。
navigator.navigate("screenName",{'paramPropKey': 'paramPropValue'});