跟着步骤安装一定能成功!

系统要求

macOS 12.0+

设置环境

下载和安装 Conda env

chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
sh ~/Downloads/Miniforge3-MacOSX-arm64.sh
source ~/miniforge3/bin/activate

定义 Conda 变量

export conda=~/miniforge3/bin/conda

安装 TensorFlow 依赖

conda install -c apple tensorflow-deps

安装 TensorFlow

python -m pip install tensorflow-macos

安装 tensorflow-metal

python -m pip install tensorflow-metal