To Install Tensorflow and Metal On Silicon Mac

1. Remove old env (if it exists)

conda deactivate

conda remove --name orson-env --all

2. Create new env with Python 3.10 (best supported by TF/DeepFace stack)

conda create --name orson-env python=3.10

conda activate orson-env

3. Install Numpy and h5py

pip install numpy==1.22.4 h5py==3.7.0

4. Pip Install Tensorflow and Metal

pip install tensorflow-macos==2.9.2 tensorflow-metal==0.5.0

5. Install Pillow

conda install pillow

6. Install Fastapil

conda install fastapi

Testing To Determine If TF AND TF GPU Are Working

Start Python

python

Import Tensorflow

import tensorflow as tf

Print TF Version

print(tf.__version__)

Print GPU List

print(tf.config.list_physical_devices('GPU'))

Use Conda Dry Run Before Installing To Make Sure New Package Is Non-Breaking

conda install package_name --dry-run

Visit Emlekezik.com