How to Install Python on macOS (Intel & M1/M2/M3) – 2026 Update

Installing Python on macOS, updated for 2026 and covering both Intel and Apple Silicon (M1/M2/M3) chips

Introduction

As we move through 2026, Python remains the undisputed backbone of data science, machine learning, web development, and automation. For macOS users—whether on older Intel-based Macs or the newer Apple Silicon M1, M2, or M3 machines—having a properly configured Python environment is essential. However, the process to install Python on macOS has evolved. With the deprecation of Python 2.7, the rise of Python 3.12+ features, and Apple’s own shift away from bundling Python with the OS, developers must take a deliberate approach. This guide provides a definitive, step-by-step walkthrough to install Python on macOS in 2026, covering system prerequisites, multiple installation methods, environment management, and silicon-specific optimizations. By the end, you will be able to install Python on macOS with confidence, regardless of your Mac’s architecture.

Understanding macOS Architectures in 2026: Intel vs. Apple Silicon (M1/M2/M3)

Before you install Python on macOS, you must know your Mac’s processor type. This affects which installer you choose and how Python interacts with native libraries.

  • Intel (x86_64): Older Macs (pre-late 2020). Uses traditional x86_64 architecture. Most Python packages work seamlessly.
  • Apple Silicon (M1, M2, M3): ARM64 architecture. Native ARM64 builds of Python offer significant performance gains, especially for machine learning workloads. However, some legacy packages still require Rosetta 2 emulation.

To check your architecture, click the Apple logo → “About This Mac.” If it says “Chip Apple M1/M2/M3,” you have ARM64. Otherwise, it’s Intel. This distinction will guide how you install Python on macOS for optimal performance.

Prerequisites Before You Install Python on macOS

  1. Update macOS: Ensure you’re running at least macOS Ventura 13.5 or newer (Sonoma 14 or Sequoia 15 recommended for 2026 compatibility). Older versions may have certificate issues.
  2. Install Xcode Command Line Tools: Many Python packages require compilers. Open Terminal and run:
   xcode-select --install
  1. Check for Existing Python Installations: Apple no longer includes Python 2.7 after macOS 12.3, but you might have leftover installs. Run:
   which python3
   python3 --version

If it points to /usr/bin/python3, that’s Apple’s deprecated stub (do not use for development). We will install Python on macOS properly in /usr/local or /opt/homebrew.

Method 1: Official Python Installer from python.org (Easiest for Beginners)

The simplest way to install Python on macOS is via the official installer. This method works identically on Intel and M1/M2/M3, though you must download the correct variant.

Step-by-Step for Intel Macs

  1. Visit python.org/downloads.
  2. The site auto-detects your OS. Click “Download Python 3.12.4” (or the latest stable 3.12.x as of 2026). For Intel, choose the macOS 64-bit universal2 installer (works on Intel and ARM, but Intel-native).
  3. Open the downloaded .pkg file.
  4. Follow the installation wizard. Check “Install for all users” and note the installation path: /Applications/Python 3.12/.
  5. After completion, open Terminal and add Python to your PATH (the installer should do this automatically, but verify):
   echo 'export PATH="/Applications/Python 3.12/bin:$PATH"' >> ~/.zshrc
   source ~/.zshrc
  1. Verify: python3 --versionPython 3.12.4

Step-by-Step for Apple Silicon (M1/M2/M3) Macs

  1. Go to python.org/downloads.
  2. Select macOS 64-bit ARM64 installer (specifically labeled for Apple Silicon). Do not use the Intel version unless you want Rosetta emulation.
  3. Run the .pkg file. The installer places Python in /Applications/Python 3.12/ but uses /opt/local/bin symlinks.
  4. Add to PATH if needed:
   echo 'export PATH="/opt/local/bin:$PATH"' >> ~/.zshrc
   source ~/.zshrc
  1. Confirm ARM64 native build:
   python3 -c "import platform; print(platform.machine())"

Output: arm64 (good) vs x86_64 (you used wrong installer).

Pros of official installer: Simple, GUI-based, works out of the box.
Cons: Manual updates, no easy version switching, can conflict with system tools.

Method 2: Using Homebrew (Recommended for Developers)

Homebrew is the de facto package manager for macOS. It simplifies the process to install Python on macOS and keeps it updated. This method is identical for Intel and M1/M2/M3, but Homebrew itself installs in different locations.

Install Homebrew

Open Terminal and run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Intel Macs: Homebrew installs to /usr/local/bin
  • Apple Silicon: Homebrew installs to /opt/homebrew/bin

After installation, follow the “Next steps” to add Homebrew to your PATH.

Install Python via Homebrew

To install Python on macOS using Homebrew:

brew install python@3.12

(Replace 3.12 with 3.13 if available in 2026.)

Homebrew installs Python 3.x alongside pip3 and idle3. It also links python3 to the Homebrew version.

Verify:

which python3
  • Intel: /usr/local/bin/python3
  • Apple Silicon: /opt/homebrew/bin/python3

Check architecture on M1/M2/M3:

file $(which python3)

Output: Mach-O 64-bit executable arm64 → native ARM64.

Managing Multiple Python Versions with Homebrew

Homebrew allows parallel installations:

brew install python@3.11
brew install python@3.12
brew install python@3.13  # if available

Switch versions using brew link or by updating PATH. However, for serious version management, consider pyenv (next section).

Pros of Homebrew: Easy updates (brew upgrade python), integrates with other packages (e.g., postgresql, node), clean uninstallation.
Cons: Slightly slower than official installer for first-time setup.

Method 3: Pyenv (Best for Advanced Users & Multiple Versions)

If you work on multiple projects requiring different Python versions (e.g., legacy code on 3.8, new projects on 3.13), pyenv is the gold standard to install Python on macOS and manage versions seamlessly.

Install pyenv

Using Homebrew:

brew install pyenv

Add to your shell (.zshrc or .bash_profile):

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
source ~/.zshrc

Install Specific Python Versions

List all installable versions:

pyenv install --list

To install Python on macOS version 3.12.4:

pyenv install 3.12.4

For Apple Silicon, pyenv automatically compiles an ARM64 build. If you need an Intel build for compatibility, set:

PYENV_CONFIGURE_OPTS="--enable-framework" arch -x86_64 pyenv install 3.12.4

Set Global or Local Versions

  • Global default: pyenv global 3.12.4
  • Project-specific: Inside a project folder, pyenv local 3.11.8 (creates .python-version file)

Verify:

python3 --version
which python3  # Should point to ~/.pyenv/shims/python3

Pros of pyenv: Granular version control, no sudo needed, per-project isolation.
Cons: Slightly more complex setup, requires compilation (needs Xcode command line tools).

Method 4: Installing Python from the Mac App Store (Third-Party)

Several third-party Python distributions are available on the Mac App Store (e.g., “Python IDE” or “Pythonista”), but these are often sandboxed and limited. They do not provide a system-wide python3 command. For serious development, avoid these unless you need an iOS-like Python environment. The recommended ways to install Python on macOS remain the three methods above.

Verifying Your Python Installation on Intel vs. M1/M2/M3

After you install Python on macOS, run these verification steps.

Basic Checks

python3 --version
pip3 --version

Architecture Check (Critical for Apple Silicon)

python3 -c "import platform; print(platform.processor())"
  • Intel Macs: i386 or x86_64
  • M1/M2/M3 (native): arm
  • M1/M2/M3 (Rosetta): i386 (means you used Intel installer)

Ensure pip Packages Match Architecture

Install a package with native ARM wheels:

pip3 install numpy
python3 -c "import numpy; print(numpy.__config__.show())"

Look for blas_mkl_info or openblas_config with arch='arm64' on Apple Silicon.

Optimizing Python for Apple Silicon (M1/M2/M3)

As of 2026, most major Python packages provide native ARM64 wheels. However, when you install Python on macOS for M-series chips, follow these best practices:

Use ARM64-Native Everything

  • Install Python via Homebrew (ARM64 version) or pyenv (with default settings).
  • For data science, install numpy, scipy, pandas via pip – they will automatically fetch ARM64 wheels.
  • For TensorFlow: Use tensorflow-macos (official Apple Silicon version) instead of tensorflow.
  pip3 install tensorflow-macos tensorflow-metal  # GPU acceleration via Metal

Rosetta 2 Fallback (When Necessary)

Some legacy packages (e.g., certain conda recipes or pre-built Intel-only binaries) require x86_64. To install Python on macOS as an Intel version on Apple Silicon:

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
arch -x86_64 brew install python@3.9

Then run Python via arch -x86_64 python3. This is rarely needed in 2026.

Setting Up a Virtual Environment (Mandatory for Projects)

After you install Python on macOS, always use virtual environments. This avoids dependency conflicts.

Built-in venv (Python 3.3+)

cd my_project
python3 -m venv venv
source venv/bin/activate
pip install flask
deactivate

Using virtualenv (More features)

pip3 install virtualenv
virtualenv myenv
source myenv/bin/activate

Conda/Mamba (For Data Scientists)

If you prefer Conda, install Miniforge (ARM64-native for M1/M2/M3):

curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh"
bash Miniforge3-MacOSX-arm64.sh

Then create an environment:

conda create -n py312 python=3.12
conda activate py312

Common Issues When You Install Python on macOS (2026 Edition)

Issue 1: “zsh: command not found: python3”

Solution: You haven’t added Python to PATH. Re-run installer or edit ~/.zshrc. For Homebrew: brew link --overwrite python@3.12.

Issue 2: SSL Certificate Errors with pip

Solution: Update certifi:

pip3 install --upgrade certifi

On older macOS, run /Applications/Python\ 3.12/Install\ Certificates.command.

Issue 3: “python3” Points to macOS’s Deprecated Version

Solution: Check which python3. If it’s /usr/bin/python3, you must prepend your custom install path. Edit ~/.zshrc and ensure /usr/local/bin or /opt/homebrew/bin comes before /usr/bin.

Issue 4: M1/M2/M3 Pip Installing Intel Packages

Solution: Uninstall Python and reinstall using ARM64 installer. Force ARM64 with:

arch -arm64 brew install python

Issue 5: “Operation not permitted” When Installing Packages

Solution: Do not use sudo pip3 install. Use virtual environments or add --user flag: pip3 install --user package.

Uninstalling Python from macOS

If you need to remove Python and start over:

  • Official installer: Delete /Applications/Python 3.12/ and remove symlinks in /usr/local/bin.
  • Homebrew: brew uninstall python@3.12
  • pyenv: pyenv uninstall 3.12.4
  • Manual clean: Remove ~/Library/Python/ and ~/Library/Caches/pip.

Keeping Python Updated in 2026

Python releases a new major version every October. As of 2026, Python 3.13 is likely stable, and 3.14 may be in alpha. To update:

  • Official installer: Download new .pkg – it installs alongside old version. Re-point PATH.
  • Homebrew: brew upgrade python
  • pyenv: pyenv install 3.13.0 then pyenv global 3.13.0

Conclusion: Which Method Should You Use to Install Python on macOS?

User ProfileRecommended Method
Complete beginnerOfficial python.org installer (ARM64 for M1/M2/M3, universal2 for Intel)
Web developer / general programmerHomebrew
Data scientistMiniforge (Conda) or Homebrew + pyenv
Advanced user with many projectspyenv

In 2026, the ecosystem has matured. Apple Silicon users can finally install Python on macOS with full native performance for almost all workloads. Intel Macs remain perfectly capable. Whichever method you choose, remember to always verify your architecture, use virtual environments, and keep your tools updated.

Now that you know how to install Python on macOS on both Intel and M1/M2/M3 chips, you’re ready to build, deploy, and scale your Python applications. Open Terminal, pick your method, and start coding.

Leave a Comment

Scroll to Top