Installing Tensorflow on M1 Mac

Prerak Dongaonkar
2 min readMar 16, 2021
#deeplearning #tensorflow #keras #google #ai #ml #machinelearning #artificialintelligence #datascience
Fig1: Tensorflow

Apple made a big statement when they switched to arm-based CPU from Intel Chipsets, shaping the future of ‘computing’ systems!

Apple has claimed to obtain up to 2x CPU performance on devices with M1 chipset, using a Neural Engine, a.k.a

The Next Genreation of Machine Learning.

#apple #m1 #macbook #cpu #pc #deeplearning #machinelearning #neuralnetworks #artificialintelligence #fast #datascience
Fig2: CPU performance vs power, credit: apple.com/in/mac/m1/

Well, that’s awesome! Should definitely provide better Machine Learning and Artificial Intelligence computing performance, right?

So I am going to cover how does an individual go about installing TensorFlow on the new M1 mac systems to leverage its computing performance.

Honestly, I struggled for quite some time to install TensorFlow on the BigSur MacOS and found two ways to do so. One of the methods is quite popular on the internet (which didn’t work for me, Booohoooo) and the second one is a little bit of tweaking, or as we like to use the Hindi term ‘Jugaad’ to get TensorFlow working on my new M1 Macbook Pro.

  1. Installing via Apple’s Github Repository

Well, this one is quite tedious and I’ll just write the steps in short so that you can get an idea of how to go about it, in the terminal. Full link to AI Buzz’s youtube video: Installing Tensorflow MacOS

2. Installing via Anaconda3

  • Step 1: Create a virtual environment with Python 3.5 version in Anaconda3
  • Step 2: Search for Tensorflow packages and install.

Personally, I found step 2 to be VERY easy and useful while Apple, Tensorflow, and Anaconda still figure out how to make TensorFlow work with the latest versions of Anaconda, python.

Hope this will help you get started with Tensorflow on your brilliant M1 systems!

Connect with me on LinkedIn

--

--

Prerak Dongaonkar

Mechanical Engineer with a Masters degree. Keen enthusiast in Data Science with active interest in Deep Learning, Machine Learning and Artificial Intelligence.