Elena' s AI Blog

TensorFlow on M1

05 Jan 2022 (updated: 14 Sep 2026) / 11 minutes to read

Elena Daehnhardt

Flux: A sleek Apple Silicon chip powering a flowing neural network of glowing nodes, representing native machine learning a...


TL;DR:
  • Installing TensorFlow on M1 macOS Monterey: step-by-step guide for setting up TensorFlow, Jupyter Notebooks, and Conda on Apple Silicon Macs.

Previous: Part 3 — Tools and Data to Experiment with Machine Learning

Next: Part 5 — Feature preprocessing

How to Install TensorFlow on M1 macOS Monterey

TensorFlow is an open-source machine learning library originally developed by the Machine Intelligence team at Google Brain for building and training deep neural networks. I chose TensorFlow because it is robust, efficient, and integrates natively with Python. Back in 2022, when I first wrote this guide, installing TensorFlow on Apple Silicon (M1) required Apple’s arm64-native packages — tensorflow-macos and tensorflow-metal — because the generic pip install tensorflow build was not yet optimised for the M1 architecture. That has since changed: from TensorFlow 2.13 onwards, pip install tensorflow ships native arm64 support directly, so you only need the separate tensorflow-macos package if you are pinned to TensorFlow 2.12 or earlier — you still need tensorflow-metal either way for GPU acceleration. See Apple’s tensorflow-metal guide for the current install steps.

This guide installs Xcode, Homebrew, Miniforge (Conda), TensorFlow, and Jupyter on M1 macOS Monterey, then benchmarks CPU versus GPU training on the MNIST dataset.

Installing Xcode Command Line Tools on M1

I had a new computer, so I started by downloading and installing Xcode from the App Store, which provides the compilers and command line tools required to build native arm64 packages.

Installing Homebrew on Apple Silicon

🔒 Subscribe to keep reading.

Installing Miniforge and Conda for arm64

🔒 Subscribe to keep reading.

Installing tensorflow-macos and tensorflow-metal in Conda

🔒 Subscribe to keep reading.

Testing TensorFlow GPU vs CPU on the MNIST Dataset

🔒 Subscribe to keep reading.

Common TensorFlow M1 Installation Errors and Fixes

🔒 Subscribe to keep reading.

Conclusion: TensorFlow on M1 with GPU Acceleration

🔒 Subscribe to keep reading.

You've hit a Deep Dive tutorial.

I spend dozens of hours researching, coding, and breaking things to write these guides. This content is free, but reserved for my subscriber community. Drop your email below to unlock this guide (and all past/future deep dives):

Already a subscriber? Use the magic link from your last newsletter, or reset your password.

New subscribers get an inbox mail: Set a password to unlock articles. The form does not log you in — use the same email afterwards.

desktop bg dark

About Elena

Elena, a PhD in Computer Science, simplifies AI concepts and helps you use machine learning.

Citation
Elena Daehnhardt. (2022) 'TensorFlow on M1', daehnhardt.com, 05 January 2022. Available at: https://daehnhardt.com/blog/2022/01/05/edaehn-tensorflow-on-m1/
All Posts