Cannot install Tensorflow on Mac m1

I try to install and fix the tensorflow on my new Mac m1 following a lot the instuctions in the internet but it's not work. The kernel will died when try to import tensorflow.

`(tensorflow-metal) ampnapat@Amps-MacBook-Pro ~ % python -m pip install tensorflow-macos

ERROR: Could not find a version that satisfies the requirement tensorflow-macos (from versions: none)

ERROR: No matching distribution found for tensorflow-macos

(tensorflow-metal) ampnapat@Amps-MacBook-Pro ~ % python -m pip install tensorflow-metal

ERROR: Could not find a version that satisfies the requirement tensorflow-metal (from versions: none)

ERROR: No matching distribution found for tensorflow-metal`

Needs macOS 12.0+?

Not sure if this directly helps you, but I was getting errors following Apple's guide.

I don't actually recall the steps I took to get here (with TF 2.5 and Metal support for GPU), but I made this to share the environment. Please let me know on the repo if it doesn't work! (or does!)

https://github.com/ctrahey/m1-tensorflow-config

If you're comfortable not using conda, you can follow the guide I linked in this post: https://developer.apple.com/forums/thread/687654

  • the guide is last link in the post

I don't just get it work even if I followed strictly the guide given at https://developer.apple.com/metal/tensorflow-plugin/

ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.9 from "/Users/mattihonkanen/miniforge3/bin/python"
  • The NumPy version is: "1.19.5"

and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.

I've installed Tensorflow multiple time on Mac M1 using this guide https://developer.apple.com/metal/tensorflow-plugin/

Just follow it step by step, don't skip the miniforge3 installation, it is absolutely mandatory to install and use the one provided in the guide.

Tested on python 3.8 and 3.9. Tensorflow is not supported on 3.10 (yet)

Cannot install Tensorflow on Mac m1
 
 
Q