๐Ÿ”ง
Mac Playbook
โฑ 5 min

VS Code

Install and configure VS Code for ML development on Mac

Replaces DGX Spark: VS Code
tools

Basic idea

VS Code is Microsoft's open-source code editor โ€” the most widely used editor for Python and ML development. Unlike Xcode or PyCharm, it's lightweight, starts in under a second, and its extension ecosystem covers everything from Jupyter notebooks to remote SSH development.

The native Apple Silicon build runs directly on M-series chips without Rosetta 2 emulation, meaning the editor itself is fast and doesn't burn battery unnecessarily. The extension ecosystem provides Python type checking (Pylance), Jupyter notebook support, AI code completion via Continue.dev, and seamless remote development โ€” you can edit files on your Mac while the code runs on a remote Linux GPU server.

What you'll accomplish

VS Code installed as a native Apple Silicon app, the code shell command available in your Terminal, and core extensions installed (Python, Jupyter, Pylance) and connected to your local Python environment for running notebooks and scripts with autocompletion and error highlighting.

What to know before starting

LSP (Language Server Protocol): Pylance runs a background type-checking process that analyzes your Python code and provides autocomplete, go-to-definition, and error highlighting in real time. It needs to know which Python interpreter you're using to find your installed packages.
Virtual environments: VS Code works best when you tell it exactly which Python interpreter to use. A project-level venv at `.venv/` is auto-detected. Without a venv, Pylance may report false errors for installed packages.
Jupyter kernels: The Python process that executes notebook cells is called a kernel. VS Code's Jupyter extension can use any installed Python interpreter as a kernel โ€” just select it from the kernel picker in the top-right of a notebook.
Command palette: `Cmd+Shift+P` opens the command palette โ€” a searchable list of all VS Code commands. Nearly every action, including ones with no keyboard shortcut, is accessible here. You'll use it constantly.
Workspace settings: VS Code stores per-project configuration in `.vscode/settings.json`. These override your user-level settings for that project, so you can have different Python paths for different projects.

Prerequisites

โ€ข macOS 10.15+, Apple Silicon or Intel
โ€ข Admin rights for installation (standard user install is also possible)

Time & risk

Duration:: 5 minutes
Risk level:: None โ€” drag to Trash to uninstall completely