M1 chip
TensorFlow installation
PackagesNotFoundError
macOS issues
software compatibility

Installing TensorFlow on M1 Chip - Issues. - PackagesNotFoundError The following packages are not available from current channels

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

PackagesNotFoundError on Apple Silicon usually means the install command is targeting the wrong architecture, wrong channel, or incompatible package versions. Many online guides mix old instructions from Intel macOS setups with M1 or M2 systems. A clean arm64 environment with consistent package sources resolves most TensorFlow installation failures.

Why This Error Happens on Apple Silicon

On M1, package availability depends on architecture and Python version support. Common failure causes include:

  • Running terminal under Rosetta and mixing x86 and arm64 packages.
  • Using outdated conda channels that no longer publish compatible builds.
  • Combining conda-installed scientific stack with mismatched pip TensorFlow packages.
  • Selecting a Python version unsupported by the chosen TensorFlow build.

Before installing anything, verify architecture from both OS and Python.

bash
uname -m
python3 -c "import platform; print(platform.machine())"

For native setup, both should report arm64.

For many developers, the least fragile route is Python virtual environment with Apple-specific TensorFlow wheels.

bash
1python3 -m venv tf-macos
2source tf-macos/bin/activate
3python -m pip install --upgrade pip setuptools wheel
4python -m pip install tensorflow-macos tensorflow-metal

Then validate import:

bash
python -c "import tensorflow as tf; print(tf.__version__)"

This avoids conda solver complexity for TensorFlow-specific packages.

Conda Workflow That Avoids Channel Conflicts

If you prefer conda for environment management, keep conda minimal and install TensorFlow with pip inside the conda environment.

bash
1conda create -n tf-m1 python=3.10 -y
2conda activate tf-m1
3conda install -c conda-forge pip -y
4pip install --upgrade pip
5pip install tensorflow-macos tensorflow-metal

This pattern is stable because conda manages Python base while pip handles Apple TensorFlow wheels.

Verify Runtime and Device Visibility

Import success is necessary but not sufficient. Check visible devices and run a tiny training job.

python
1import tensorflow as tf
2import numpy as np
3
4print("TensorFlow:", tf.__version__)
5print("All devices:", tf.config.list_physical_devices())
6print("GPU devices:", tf.config.list_physical_devices("GPU"))
7
8x = np.random.rand(256, 8).astype("float32")
9y = np.random.randint(0, 2, size=(256,))
10
11model = tf.keras.Sequential([
12    tf.keras.layers.Input(shape=(8,)),
13    tf.keras.layers.Dense(16, activation="relu"),
14    tf.keras.layers.Dense(1, activation="sigmoid")
15])
16model.compile(optimizer="adam", loss="binary_crossentropy")
17model.fit(x, y, epochs=2, batch_size=32, verbose=1)

If GPU list is empty, installation still may be usable on CPU, but acceleration is not active.

Clean Rebuild Beats Patching Broken Environments

When package state is inconsistent, trying to repair in place wastes time. Recreate environment from scratch.

bash
1conda deactivate
2conda env remove -n tf-m1
3
4# or for venv
5# deactivate
6# rm -rf tf-macos

Then reinstall using one documented flow instead of mixing commands from multiple guides.

Version Pinning for Team Reproducibility

After a working setup, pin versions so teammates and CI use the same stack.

bash
python -m pip freeze | grep -E "tensorflow|keras|numpy|grpcio|protobuf"

Store pinned versions in a requirements file and revalidate after upgrades.

Extra Checks for Persistent Issues

If installation still fails:

  • Confirm pip points to the active environment.
  • Check which python and which pip.
  • Update command line tools on macOS.
  • Remove cached wheels if stale artifacts are suspected.
bash
which python
which pip
pip cache purge

These checks catch many hidden environment mismatches.

Common Pitfalls

  • Running installation inside Rosetta terminal while expecting arm64 packages.
  • Mixing many conda channels and creating solver conflicts.
  • Using stale environment files with package versions that no longer exist.
  • Assuming TensorFlow import success means GPU acceleration is working.
  • Upgrading Python without checking TensorFlow compatibility first.

Summary

  • 'PackagesNotFoundError on M1 is usually an architecture, channel, or compatibility mismatch.'
  • Use a clean arm64 environment and one consistent install strategy.
  • 'venv plus tensorflow-macos and tensorflow-metal is often the most reliable path.'
  • Validate with both import checks and a short training script.
  • Pin working versions to keep local and team environments stable.

Course illustration
Course illustration