install Tensorflow for Mac M1 / M2
xxxxxxxxxx
#Run this lines of code individually in terminal with Anaconda installed in it
conda create -n myenv python
# For me python version 3.9 worked properly you can try with 3.10 or higher if it works!
#installing package for tensorflow dependencies, tf-macos and tf-metal
conda install -c apple tensorflow-deps ==2.10.0
python -m pip install tensorflow-macos==2.10.0
python -m pip install tensorflow-metal==0.6.0
#tensorflow-macos version 2.10.0 need numpy version 1.23.2 only no other version works for it
pip install numpy == 1.23.2
For my Mac M1 after creating a Anaconda environment for Tensorflow this versions of packages worked for me