๐ Recommended Way (Professional Setup โ 2026)
We will use:
โ
Homebrew Python
โ
Virtual Environment
โ
JupyterLab (modern)
โ
Proper PATH handling
๐งฉ Step 0 โ Check Mac Type
uname -m
arm64โ Apple Silicon (M1/M2/M3)x86_64โ Intel
๐งฉ Step 1 โ Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Verify:
brew --version
๐งฉ Step 2 โ Install Clean Python (Do NOT use system Python)
brew install python
Check:
which python3
Should show:
/opt/homebrew/bin/python3 (Apple Silicon)
/usr/local/bin/python3 (Intel)
๐งฉ Step 3 โ Create Isolated Jupyter Environment (Best Practice)
mkdir ~/jupyter-projects
cd ~/jupyter-projects
python3 -m venv jupyter-env
source jupyter-env/bin/activate
Your terminal will now show:
(jupyter-env)
๐งฉ Step 4 โ Upgrade pip Properly
pip install --upgrade pip
๐งฉ Step 5 โ Install JupyterLab (Recommended Over Notebook)
pip install jupyterlab
If you specifically want classic notebook:
pip install notebook
๐งฉ Step 6 โ Run Jupyter
Modern UI:
jupyter lab
Classic UI:
jupyter notebook
Opens at:
http://localhost:8888
๐งฉ Step 7 โ Make It Easier (Optional Alias)
Open:
nano ~/.zshrc
Add:
alias jl="source ~/jupyter-projects/jupyter-env/bin/activate && jupyter lab"
alias jn="source ~/jupyter-projects/jupyter-env/bin/activate && jupyter notebook"
Reload:
source ~/.zshrc
Now you can simply run:
jl
๐ฅ If You See “command not found: jupyter”
Do NOT panic.
Just run:
source jupyter-env/bin/activate
jupyter lab
If needed:
export PATH="$HOME/jupyter-projects/jupyter-env/bin:$PATH"
๐ง Why This Is the Best Method
| Method | Problem |
|---|---|
| System Python | Breaks with macOS updates |
| User pip install | PATH mismatch |
| Anaconda | Heavy (2โ3 GB) |
| Virtualenv + Brew Python | Clean & Stable โ |
๐ฏ Optional: Install Common Packages
For AI/Data:
pip install numpy pandas matplotlib seaborn scikit-learn
For DevOps:
pip install requests pyyaml boto3 kubernetes
For AI/LLM:
pip install openai transformers langchain
๐ If You Already Installed Jupyter Globally (Cleanup)
You can remove old user installation:
pip uninstall notebook jupyterlab
Then follow the clean setup above.