Mac OS M1芯片安装tensorflow

1.确认把系统更新到12以后

2.安装miniforge3

添加执行权限:chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
执行安装:sh ~/Downloads/Miniforge3-MacOSX-arm64.sh -b -p $HOME/miniforge3
激活环境:source ~/miniforge3/bin/activate
可以添加到系统环境变量,以后就不用再激活

3.新建conda python环境

conda create -n tf python==3.9

4.安装tensorflow

conda activate tf
conda install -c apple tensorflow-deps
python -m pip install tensorflow-macos
python -m pip install tensorflow-metal

5.测试

posted @ 2023-04-14 15:02  rm-rf*  阅读(56)  评论(0编辑  收藏  举报