Pip is tied to a specific Python version. After an upgrade, reinstall your tools.
Instead, install the new version alongside the old one. sudo apt update sudo apt install software-properties-common sudo add-apt-repository ppa:deadsnakes/ppa sudo apt update sudo apt install python3.12 # Replace 3.12 with the latest version Method B: Using pyenv (Best for Developers) pyenv lets you switch versions instantly per project. how to update python
If you have ever tried to run python3 --version only to sigh because you are still stuck on Python 3.8, this guide is for you. Pip is tied to a specific Python version
brew link --overwrite python python3 --version The "macOS Troubleshooting" Fix If typing python3 still launches an old version, your PATH is prioritizing the wrong location. Add this to your ~/.zshrc (or ~/.bash_profile ): Add this to your ~/
python --version Windows allows side-by-side versions. To run the old version later, use py -3.9 instead of python . How to Update Python on macOS MacOS ships with an ancient, system-dependent version of Python 2.7 (or 3.6 on older OSes). Do not touch the system Python. Instead, use Homebrew. Step 1: Install Homebrew (if you haven't) Open Terminal and paste: