Python Development Environment Setup on macOS
# Python Development Environment Setup on macOS
## Step 1: Install Homebrew
bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
## Step 2: Use Homebrew to Install Python 3
bash
brew install python
## Step 3: Install Visual Studio Code
– Download from [code.visualstudio.com](https://code.visualstudio.com/) and drag to Applications.
## Step 4: Create & Activate a Virtual Environment
bash
python3 -m venv venv
source venv/bin/activate
## Differences from Linux
– Homebrew replaces apt for package management.
– macOS default Python may be outdated; use Homebrew’s Python.
## Screenshot Placeholders
– [Homebrew install terminal]
– [VS Code on macOS]
## Troubleshooting Tips
– If ‘brew’ not found, check Homebrew install path.
– For Python version issues, use which python3 to verify path.
Leave a Reply