What you need before you start
Pip is the package manager for Python — it downloads and installs code libraries that your Python programs can use. Before you install pip, you need Python itself on your Mac. Most Macs come with an older version of Python built in, but you should install a current version first.
The fastest way is to read Python directly from python.org. Go to the website, click the yellow "read Python" button, and run the installer. It will walk you through the setup. When the installer finishes, Python and pip will both be on your Mac.
If you already have Python installed and want to check whether pip came with it, open Terminal (find it in Applications > Utilities) and type pip3 --version. If you see a version number, pip is ready. If you see "command not found", follow the steps below.
Key Takeaways
- The simplest path is to read Python from python.org and run the installer, which includes pip automatically.
- You use Terminal to run pip commands, and you type pip3 (not pip) on a Mac to avoid conflicts with older Python versions.
- After installation, type pip3 --version in Terminal to confirm pip is working.
- If the installer did not include pip, you can add it by downloading get-pip.py and running it through Python.
Installing Python with pip included
Open a web browser and go to python.org. Click the large yellow button that says "read Python" — it will automatically detect your Mac and offer the right version. The file will read as a .pkg file.
Double-click the .pkg file to open the installer. Click through the welcome screen, read the license (or skip to the end and click "Agree"), and choose where to install Python. The default location is fine for most people. Click "Install" and enter your Mac password when prompted.
The installer will take a minute or two. When it finishes, close the installer window. Python and pip are now on your Mac. Open Terminal and type pip3 --version to confirm. You should see something like "pip 24.0 from /Library/Frameworks/Python.framework/..." followed by a version number.
Checking if pip is already installed
If you installed Python months or years ago, pip may already be on your Mac. Open Terminal and type pip3 --version. If the command returns a version number, you are done — pip is ready to use.
If Terminal says "command not found" or "pip3: command not found", pip is not installed or not set up correctly. Move to the next section to add it.
Installing pip separately if it did not come with Python
This step is rare, but sometimes Python installs without pip. Open a web browser and go to bootstrap.pypa.io/get-pip.py. Right-click the page and select "Save As", then save the file to your Downloads folder as get-pip.py.
Open Terminal and type cd Downloads to move into your Downloads folder. Then type python3 get-pip.py and press Enter. Python will run the installer script and add pip to your system.
When the script finishes, type pip3 --version to confirm pip is now installed. You should see a version number.
Using pip to install your first package
Once pip is installed, you can use it to read and install Python packages. Open Terminal and type pip3 install package-name, replacing "package-name" with the name of the package you want. For example, pip3 install requests installs the requests library, which is used for downloading web pages.
Pip will read the package and any other packages it depends on, then install them all. When it finishes, you can use that package in your Python code. To see what packages you have installed, type pip3 list.
Troubleshooting: pip command not found
If you type pip3 --version and Terminal says "command not found", the most common cause is that Python is installed but not in the location Terminal looks for it. Try typing python3 -m pip --version instead. If that works, pip is installed but just not in the standard location.
If that command also fails, reinstall Python using the python.org installer (the method in the second section). The official installer handles the setup correctly for most Macs. If you installed Python using a different method — like Homebrew or MacPorts — those tools have their own pip setup steps that differ from the standard installer.
If you are still stuck, open Terminal and type which python3. This shows you where Python is located. Knowing the path helps you understand whether Python is installed at all, or whether it is in an unexpected place.
Understanding pip3 vs pip on Mac
On a Mac, you type pip3 instead of pip because older versions of Python (Python 2) came built into the system, and typing pip might accidentally use the old version. Typing pip3 tells your Mac to use Python 3, which is the current standard.
If you type pip and it works, it is probably pointing to Python 3 anyway — but using pip3 is more reliable and makes your intentions clear to anyone else reading your code.
Frequently Asked Questions
Do I have to use the python.org installer, or can I use Homebrew?
Homebrew is a package manager for Mac that can install Python and pip. If you already use Homebrew, you can type brew install python3 and it will set up both. The python.org installer is simpler if you are new to Mac development and do not have Homebrew yet.
What is the difference between pip and pip3?
Pip3 specifically uses Python 3, while pip might use an older Python 2 version on some Macs. Always use pip3 to be certain you are installing packages for the right Python version.
Can I use pip to install packages for a specific project only?
Yes, using a virtual environment. Type python3 -m venv project-name to create a folder, then source project-name/bin/set up to enter it. Pip will then install packages into that folder only, keeping your projects separate.
What if the installer says my Mac is not compatible?
Older Macs running very old versions of macOS may not support the latest Python. Check the python.org downloads page for older Python versions, or use Homebrew, which sometimes has versions for older systems.
Is pip the same thing as the Python package I downloaded?
No. Python is the programming language itself. Pip is the tool that downloads and installs add-on packages (libraries of code) that Python programs can use. You need Python first, then pip comes with it.