The Ultimate MacBook Pro M1 Developer Setup Guide

Overview

Setting up a new development machine correctly saves hours of frustration later. This guide explores the transition to a

with the
M1 Max
chip, focusing on transforming a stock
macOS
installation into a high-performance Python development environment. By streamlining the terminal, managing Python versions effectively, and optimizing
VS Code
, you create a workflow that gets out of your way and lets you focus on logic.

Prerequisites

To follow this guide, you should have basic familiarity with the command line and the

programming language. While this tutorial focuses on the Apple Silicon architecture, many of the
VS Code
configurations apply globally to
Windows
and
Linux
environments as well.

Key Libraries & Tools

  • Homebrew
    : The essential package manager for macOS.
  • iTerm2
    : A powerful terminal replacement for the default Mac console.
  • Oh My Zsh
    : A framework for managing Zsh configurations and themes.
  • Pyenv
    : A tool to manage and switch between multiple Python versions.
  • Docker
    : Containerization platform for deploying cloud-native applications.
  • Rectangle
    : An open-source window management tool for macOS.
The Ultimate MacBook Pro M1 Developer Setup Guide
How To Setup A MacBook Pro M1 For Software Development

Code Walkthrough

1. Initializing Homebrew and Shell

First, install

to handle system-level dependencies. After the installation script finishes, you must add the binary to your path to ensure the brew command is recognized.

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Add to path (replace <user> with your username)
echo 'eval "(/opt/homebrew/bin/brew shellenv)"' >> /Users/<user>/.zprofile
eval "(/opt/homebrew/bin/brew shellenv)"

2. Managing Python Environments

Avoid using the system-provided Python. Instead, use

to install specific versions. This prevents version conflicts when working on different projects.

# Install pyenv via brew
brew install pyenv

# Install a specific Python version
pyenv install 3.10.1

# Set the global version
pyenv global 3.10.1

3. VS Code Automation

In

, automate your styling using the
Black
formatter and the
Vim
plugin for faster navigation. Configure your settings.json to handle these tasks on save.

{
    "python.formatting.provider": "black",
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
        "source.organizeImports": true
    },
    "vim.smartRelativeLine": true
}

Syntax Notes

When configuring

, the shell defaults to
Zsh
. Configuration changes belong in .zshrc or .zprofile. For
VS Code
, the use of "vim.smartRelativeLine": true is a notable convention for
Vim
users; it displays the current line number but shows relative distances for all other lines, making vertical jumps significantly faster.

Practical Examples

Using

allows you to snap windows using keyboard shortcuts (e.g., Command + Option + Left Arrow). This mimics the window-snapping features found in
Windows
but adds more granular control for developers multitasking between a browser, terminal, and editor. For
Python
developers,
Pyenv
is particularly useful when you need to maintain a legacy project on Python 3.7 while starting new work on 3.11.

Tips & Gotchas

  • Caps Lock Swap: Map Caps Lock to Escape in System Preferences. It is a game-changer for
    Vim
    users who need to exit Insert Mode constantly.
  • Apple Silicon Docker: Always ensure you download the "Apple Chip" version of
    Docker
    . The Intel version will run via Rosetta 2 but suffers from significant performance degradation.
  • Path Issues: If brew commands fail after installation, double-check that you executed the path configuration commands in your shell profile.
4 min read