安装环境
macOS Monterey 12.3
一、安装Homebrew
$ /bin/bash -c "$(curl -fsSL \
https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
//一键安装脚本:
$ /bin/zsh -c"$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
- 安装xcode及命令后工具
$ xcode-select --install
可用以下命令删除旧版本
sudo xcode-select --switch /Library/Developer/CommandLineTools/
或:
sudo rm -rf /Library/Developer/CommandLineTools
- 查看是否安装成功
$ gcc -v
Apple clang version 14.0.0 (clang-1400.0.29.102)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
- 安装Bazelisk
$ brew install bazelisk
- clone MediaPipe库到本地
$ git clone https://github.com/google/mediapipe.git
$ cd mediapipe
- 安装OpenCV和FFmpeg
$ brew install opencv@3
//glog依赖项导致了一个已知问题,卸载glog
$ brew uninstall --ignore-dependencies glog
若有下载依赖报错,则先下载依赖
$ brew install openexr
$ brew install libvmaf
$ brew install libx11
$ brew install libarchive
$ brew install opencv@3
- 查看Opencv的版本及信息
$ brew info opencv@3
- Opencv安装成功日志:
==> Summary