Python Mac - Upgrade
alias python=python3 alias pip=pip3 Then reload:
Here’s a complete guide to upgrading Python on a Mac, covering multiple methods with pros and cons. Homebrew gives you the latest Python, easy updates, and better package management. Install/Update Homebrew /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" brew update brew upgrade Install Latest Python brew install python This installs Python 3.12+ as python3 . Switch to New Python (Optional) Add to ~/.zshrc or ~/.bash_profile : upgrade python mac
rm -rf venv python3 -m venv venv source venv/bin/activate pip install -r requirements.txt pip3 install --upgrade jupyter python3 -m ipykernel install --user --name=python3 Troubleshooting Common Issues | Problem | Solution | |---------|----------| | command not found: python | Use python3 or create alias | | SSL certificate errors | /Applications/Python\ 3.x/Install\ Certificates.command | | pip not found | python3 -m ensurepip --upgrade | | Permission denied | Use --user flag: pip3 install --user package | Quick One-Liner (Homebrew) brew update && brew upgrade python && python3 --version Best for most users: Homebrew (Method 1) Best for developers: Pyenv (Method 3) Best for simplicity: Official installer (Method 2) alias python=python3 alias pip=pip3 Then reload: Here’s a