How to Run pip with Python 3 on Mac OS

TLDR;
Use
python3andpip3— don’t rely onpythonorpipUse Homebrew to install Python if needed:
brew install python3Run
pipin scripts usingpython3 -m pipUse
venvfor project-level dependency management
Have you tried installing Python3 on your Mac, or more so tried to use pip, and then you face the annoying moment where it’s not clear which Python version is in play or even worse, you accidentally install a package into the wrong interpreter or you followed the official docs and installed everything correctly but don’t know how to use the commands?
I faced this same challenge while at a codelab, and just like you I had to use most of my time for building to try to figure out how to get pip working to even start with.
Here’s how to get pip working cleanly with Python3 on macOS, without pulling your hair out 😊;
👉 Step 1: Check your Python 3 install
macOS used to ship with Python2 by default, so running python might still point to that legacy version.
Open your Terminal and run:
python3 --version
You should get something like:
Python 3.13.5
PS.: Python 3.13 is the latest stable release at the time of writing this post.
If that doesn't work, install the latest Python3 using Homebrew:
brew install python3
This gives you:
python3pip3
Or you could just download the Python3 installer here; Python3 installer.
Ready to go.
👉 Step 2: Always use pip3, not pip
Don’t trust pip alone unless you’re absolutely sure it’s mapped to Python 3. Instead, just use:
pip3 install some-package
This avoids surprises and keeps everything clean.
👉 Step 3: Installing packages inside scripts?
PS.: Do this only where necessary.
When automating with Python, do this to make sure the right pip is used:
import subprocess
import sys
subprocess.check_call([sys.executable, "-m", "pip", "install", "some-package"])
This runs pip for the currently running Python interpreter, whether it's the global python3 or inside a virtualenv.
👉 Step 4: Use virtual environments (seriously)
They’re lightweight and essential for managing project dependencies:
python3 -m venv venv
source venv/bin/activate
pip install some-package
Now you’re isolated from system Python and global packages.
🥂 Bonus: Official Python 3 Docs
If you want to dig deeper into pip, venv, or the Python standard library:
If this helps you, please don’t forget to like, share and comment to help others facing same blocker.
Follow for more tips! 😉




