Setup Machine Learning Environment/OpenCV/TF On M1 Mac (Apple Silicon)

https://trayansh.medium.com/setting-machine-learning-environment-on-m1-mac-apple-silicon-959836bf494d

sudo xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

So if you haven’t config the brew environment variable, the correct step to config the brew environment variable on your Mac is:

echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile

Now we need to activate the changes. Type this command to activate and try drew doctor again:

source ~/.bash_profile
brew install gcc
brew install cmake
brew install wget

change as your Mac name

cmake \
-DCMAKE_SYSTEM_PROCESSOR=arm64 \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DWITH_OPENJPEG=ON \
-DWITH_IPP=OFF \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=/Users/yanli/miniforge3/opencv_contrib-4.5.0/modules \
-D PYTHON3_EXECUTABLE=/Users/yanli/miniforge3/envs/ml/bin/python3 \
-D BUILD_opencv_python2=OFF \
-D BUILD_opencv_python3=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_ENABLE_NONFREE=ON \
-D BUILD_EXAMPLES=ON ..
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值