My Mac Setup

My Mac Setup
setup
macos
development-environment
productivity
tools
Author

Nipun Batra

Published

June 12, 2021

Setting up a new Mac

Here is a screenshot.

I will now discuss how I setup a new Mac. I use homebrew. It makes it very easy to maintain all the packages up to date.

Install homebrew and some pertinent packages

xcode-select --install

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

Install git

brew install git

Install Git-Credential-Manager

brew tap microsoft/git
brew install --cask git-credential-manager-core

Install powerline fonts

git clone https://github.com/powerline/fonts
cd fonts
./install.sh

Use powerline fonts in shell

Go to Terminal -> Preferences Change font to powerline I am using Roboto Mono Light Powerline 18pt

git clone git://github.com/stephenway/monokai.terminal.git

cd monokai.terminal

open monokai.terminal

(set this theme as default)

Install Zoom

brew install --cask zoom

Install Firefox

brew install --cask firefox

Install VSCode

brew install --cask visual-studio-code

Install OBSStudio

brew install --cask obs

VLC

brew install --cask vlc

wget

brew install wget

Download oh-my-zsh

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Python Environment Setup with uv

Install uv

curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

Check installation:

uv --version

Install Python 3.12

(PyTorch GPU wheels are available only up to 3.12.)

uv python install 3.12

Create a global environment

uv venv ~/.uv/nb-base --python 3.12
source ~/.uv/nb-base/bin/activate

Optional auto-activation:

echo 'source ~/.uv/nb-base/bin/activate' >> ~/.zshrc

Install core packages

uv pip install -U pip setuptools wheel
uv pip install -U jupyterlab ipykernel numpy pandas scipy matplotlib seaborn scikit-learn tqdm requests

Install PyTorch (Mac - CPU/MPS)

For Mac (Apple Silicon M1/M2/M3 with Metal Performance Shaders support):

uv pip install torch torchvision torchaudio

Verify:

python -c "import torch; print(torch.__version__); print('MPS available:', torch.backends.mps.is_available())"
# → e.g. 2.5.0
# → MPS available: True (on Apple Silicon Macs)

Note: Macs don’t support CUDA. Apple Silicon Macs use MPS (Metal Performance Shaders) for GPU acceleration. Intel Macs will use CPU only.

Register the Jupyter kernel

python -m ipykernel install --user --name nb-base --display-name "Python (nb-base)"

Verify installation

which python
python --version
jupyter kernelspec list

Expected:

/Users/<user>/.uv/nb-base/bin/python
Python 3.12.x
nb-base   /Users/<user>/.local/share/jupyter/kernels/nb-base

Connect to VSCode

Open any .ipynb file

Kernel picker → Select Another Kernel → Jupyter Kernel → Python (nb-base)

Optional workspace config → .vscode/settings.json:

{
  "python.defaultInterpreterPath": "/Users/<user>/.uv/nb-base/bin/python",
  "jupyter.jupyterServerType": "local"
}

You can also configure Python interpreter: Cmd + Shift + p -> Select Python Interpreter -> Point to ~/.uv/nb-base/bin/python

Additional Tools

Install LaTeX (tinyTeX)

First, install quarto using https://quarto.org/docs/get-started/

See https://danmackinlay.name/notebook/latex_installation.html for more

quarto install tool tinytex

Install comprehensive LaTeX packages

Install a comprehensive set of packages to avoid missing dependencies before deadlines:

# Core collections and fonts
tlmgr install collection-fontsrecommended collection-latexrecommended \
  collection-fontsextra collection-latexextra

# Graphics and plotting
tlmgr install pgfplots tikz-cd pgf pgfgantt tikzscale tikz-3dplot

# Fonts
tlmgr install psnfss type1cm cm-super sourcesanspro sourcecodespro \
  lato roboto fira libertine

# Beamer themes and presentation
tlmgr install beamertheme-metropolis beamer-verona pgfopts \
  appendixnumberbeamer

# Bibliography and references
tlmgr install biblatex biber logreq natbib

# Math and symbols
tlmgr install amsmath amscls amsfonts mathtools unicode-math \
  stmaryrd bbm-macros dsfont

# Tables and formatting
tlmgr install booktabs multirow longtable array tabularx \
  threeparttable siunitx

# Figures and floats
tlmgr install adjustbox collectbox subcaption wrapfig float \
  caption placeins

# Code listings
tlmgr install listings minted fancyvrb

# Miscellaneous utilities
tlmgr install underscore ucs xstring etoolbox xifthen \
  enumitem parskip geometry fancyhdr hyperref cleveref \
  todonotes comment csquotes microtype

# PDF and graphics
tlmgr install pdfpages dvipng epstopdf graphicx xcolor

# Algorithm packages
tlmgr install algorithm2e algorithms algorithmicx

# Symbols and icons
tlmgr install fontawesome5 academicons

# Additional useful packages
tlmgr install appendix blindtext lipsum standalone

Create symlink for dvipng:

ln -s ~/Library/TinyTeX/bin/*/dvipng /usr/local/bin/

Searching for a missing .sty file

tlmgr search --global --file "/sourcesanspro.sty"

Installing TexStudio

brew install --cask texstudio

FFMPeg

brew install ffmpeg

Imagemagick

brew install imagemagick

Ghostscript

brew install ghostscript

Install pandoc

brew install pandoc

Viewing installed packages

brew leaves > brew.txt

The content of brew.txt is:

boost
cmake
ffmpeg
fish
git
graphviz
ilmbase
imagemagick
pandoc
r
rtmpdump
swig
vim
wget

brew list --cask > casks.txt

The content of casks.txt is:

anydesk
arduino
audacity
firefox
google-chrome
inkscape
keycastr
mactex
notion
obs
pdf-expert
pycharm
rstudio
simplenote
texstudio
visual-studio-code
vlc
zoom

Updating packages

To update packages in your uv environment:

source ~/.uv/nb-base/bin/activate
uv pip install -U <package-name>

To update all packages:

uv pip list --outdated
uv pip install -U <list-of-packages>