If you use your Mac for programming, you may encounter problems if pip isn’t installed, as it’s required to work with apps that use the Python language. Although pip is usually installed automatically when you install Python, if programs aren’t working normally, it may be because you don’t have it downloaded on your computer, or because it’s not installed correctly.
So, how do you OS X install pip on your Mac? Read on to find it out.
Before we start:
Installing pip on your Mac isn’t the only way to ensure a smooth and trouble-free Mac experience. You can also improve the performance of your installed apps by downloading MacKeeper’s Smart Uninstaller. This tool can also help you get rid of memory-draining apps and remove browser extensions and leftover files.
How to use MacKeeper’s Smart Uninstaller on your device:
- Open MacKeeper on your Mac.
- Go to the Cleaning section and select Smart Uninstaller.
- Click Start Scan.
- Select the categories you want to clean, then click Remove Selected.
- Click Remove to confirm.
In this article you will find the following:
Now that you’ve got your Mac ready for new programs, our team of experts is here to help you get pip for Mac. Let’s continue.
What is pip on Mac
Pip, also known as pip3, stands for preferred installer program or pip installs packages. This package management system, as the name suggests, is used to install and manage software and libraries, particularly for Python apps. Usually, pip comes pre-installed with Python version 3.4 and later.
Additionally, the packages for pip can be found in the Python Package Index, or PyPI, which is the software repository for the Python programming language.
What to do before installing pip on macOS
To install pip on a Mac, you’ll need a running macOS system (take a look at the full list of macOS versions), Python installed on it, and a user account with admin privileges.
Before installing pip on macOS, you should:
1. View your Python version
To check the version of Python installed on your Mac:
- Go to Finder, then click Applications from the left-side bar.
- Open the Utilities folder and launch Terminal.
- Type the following command (!without the full stop): python --version.
- Press the Return key.
If you have Python installed, you’ll see the version there.
![To view the Python version installed on your Mac, go to Applications in Finder and open the Utilities folder. To view the Python version installed on your Mac, go to Applications in Finder and open the Utilities folder.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_5b673842d5.png)
![To verify if pip is on your Apple computer, launch Terminal from the Utilities folder. To verify if pip is on your Apple computer, launch Terminal from the Utilities folder.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_2f3228d105.png)
![To check whether you have pip installed on Mac, use the pip --version command and press Return. To check whether you have pip installed on Mac, use the pip --version command and press Return.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_9f0201fff8.png)
2. Check if pip is installed on your Mac
To verify if pip is already installed on your Mac:
- Go to Finder and select the Applications folder on your left.
- Double-click on the Utilities folder, then launch Terminal.
- Type the following command (!without the full stop): pip --version.
- Press the Return key.
If you get a positive result, it means pip is installed.
![To check if pip is installed on your Mac, open Finder, select Applications and open the Utilities folder. To check if pip is installed on your Mac, open Finder, select Applications and open the Utilities folder.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_8cbf906a8e.png)
![To verify if pip is on your Apple computer, launch Terminal from the Utilities folder. To verify if pip is on your Apple computer, launch Terminal from the Utilities folder.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_010c95fec9.png)
![To check whether you have pip installed on Mac, use the pip --version command and press Return. To check whether you have pip installed on Mac, use the pip --version command and press Return.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_f40ce08211.png)
How to install pip on Mac
Once all the checks are complete, and if you’ve confirmed that pip is actually not installed on your computer, the next step is to download pip on Mac. You have several options at your fingertips to do this:
1. Via ensurepip
Although we believe it’s the best way to download pip on a Mac, we recommend that you check the following pros and cons before you decide on this method:
Pros | Cons |
Simple and straightforward method to install pip on Mac
You don’t need external commands
No need of an Internet connection either | Only available for Python 3.4. or later
|
If you end up choosing the ensurepip route to install pip on Mac, follow these steps:
- Open Finder on your Mac and select Applications.
- Open Utilities, then launch Terminal.
- Type the following command (!without the full stop): python -m ensurepip.
- Press the Return key.
![To install pip via ensurepip on your Mac, open Finder, select Applications and open Utilities. To install pip via ensurepip on your Mac, open Finder, select Applications and open Utilities.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_c11c93aac0.png)
![To install ensurepip on your Mac or MacBook, launch Terminal from Utilities. To install ensurepip on your Mac or MacBook, launch Terminal from Utilities.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_a5abb59db4.png)
![To finalize the installation of ensurepip on Mac, use the python -m ensurepip command and press Return. To finalize the installation of ensurepip on Mac, use the python -m ensurepip command and press Return.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_dcf527774c.png)
2. Using Homebrew
Alternatively, you can opt for the Homebrew package manager, which also has its own advantages and disadvantages:
Pros | Cons |
Very popular and reliable package manager
Also used to install apps that don’t include their own installer
Supports other programming languages other than Python | Not as straightforward and quick as ensurepip
|
Do you like what Homebrew has to offer? First, you’ll need to install Homebrew on your Mac:
- Launch Finder and choose the Applications folder on your left.
- Launch the Utilities folders, then double-click on Terminal.
- Copy and paste the following command: /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
- Press Return, and press Return again after a list of folders appears.
- If prompted, type in your admin password.
- You should see a message stating the installation’s been successful.
![To install Homebrew on your Mac, open Finder, select Applications and open Utilities. To install Homebrew on your Mac, open Finder, select Applications and open Utilities.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_33e7240173.png)
![To install Homebrew on your Mac or MacBook, launch Terminal from Utilities. To install Homebrew on your Mac or MacBook, launch Terminal from Utilities.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_748bafa9a1.png)
![To finalize the installation of Homebrew on Mac, use the /bin/bash -c $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) command and press Return twice. To finalize the installation of Homebrew on Mac, use the /bin/bash -c $(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh) command and press Return twice.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_2a08cffb86.png)
Now, it’s time to install pip:
- Go to Terminal again.
- Type the following command (!without the full stop): brew install python.
- Press Return.
- Once the installation is complete, type (!without the full stop): brew unlink python && brew link python.
- Press Return.
![To install pip via Homebrew, type brew install python in Terminal and press Return. To install pip via Homebrew, type brew install python in Terminal and press Return.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_a59c6997c7.png)
![To finalize the installation of pip via Homebrew, type brew unlink python && brew link python in Terminal and press Return. To finalize the installation of pip via Homebrew, type brew unlink python && brew link python in Terminal and press Return.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_ed574da6dc.png)
3. With get-pip.py
If none of the methods above are right for you, we suggest you trying a third option, get-pip.py, although you might want to check the pros and cons first as it’s not the most recommended method.
Pros | Cons |
Automatically downloads and installs the latest pip package for Python
Easy installation process | Only compatible with Python3 or later versions
A risky method as it uses an online script |
If you opt for this online script, follow these simple instructions:
- Launch Finder on your Apple computer.
- Select Applications from the left-side bar.
- Open the Utilities folder, find Terminal and launch it.
- Type the following command (!without the full stop): curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py.
- Press the Return key.
- Once the script has loaded, type this (!without the full stop): python3 get-pip.py.
- Press Return.
![To install get-pip.py on your Mac, open Finder, select Applications and open Utilities. To install get-pip.py on your Mac, open Finder, select Applications and open Utilities.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_1795a13beb.png)
![To install get-pip.py on your Mac or MacBook, launch Terminal from Utilities. To install get-pip.py on your Mac or MacBook, launch Terminal from Utilities.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_0627d21430.png)
![To continue with the installation of get-pip.py on Mac, use the curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py command and press Return. To continue with the installation of get-pip.py on Mac, use the curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py command and press Return.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_8884396780.png)
![To finalize the installation of get-pip.py on Mac, use the python3 get-pip.py command and press Return. To finalize the installation of get-pip.py on Mac, use the python3 get-pip.py command and press Return.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_13211b3137.png)
How to verify pip installation on MacBook
Verifying if the pip installation on your MacBook was done correctly goes like this:
- Launch Terminal by going to Finder > Applications > Utilities.
- Type this command (!without the full stop): python3 -m pip --version.
- Press Return.
![To verify the pip installation on your Mac, launch Finder, select Applications and open Utilities. To verify the pip installation on your Mac, launch Finder, select Applications and open Utilities.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_a2f7ddf852.png)
![To verify if pip was installed correctly on your Mac or MacBook, launch Terminal. To verify if pip was installed correctly on your Mac or MacBook, launch Terminal.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_ac5a812554.png)
![To finalize with the installation verification of pip on Mac, use the python3 -m pip --version command and press Return. To finalize with the installation verification of pip on Mac, use the python3 -m pip --version command and press Return.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_4a20623640.png)
Hint from our team:
If you encounter any issues when executing a command on your Mac, follow our team of experts’ advice on permissions denied in Zsh.
How to upgrade pip on Mac via Terminal
Follow these steps to update pip on macOS:
- Open Terminal by going to Finder > Applications > Utilities.
- Type this command (!without the full stop): python3 -m pip install --upgrade pip.
- Press Return.
![To update pip on your Mac, open Finder, select Applications and click on Utilities. To update pip on your Mac, open Finder, select Applications and click on Utilities.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_05322b8d94.png)
![To upgrade pip on MacBook, launch Terminal. To upgrade pip on MacBook, launch Terminal.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_923840900d.png)
![To finalize the pip update on Mac, use the python3 -m pip install --upgrade pip command and press Return. To finalize the pip update on Mac, use the python3 -m pip install --upgrade pip command and press Return.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_a2bd791bdd.png)
How to remove any previous installation of pip (if necessary)
If you wish to remove Python from Mac, use another pip installation method or fix any error. Do the folliowing to uninstall pip:
- Launch Finder on your Mac or MacBook.
- Choose Applications from the left-side bar, then open the Utilities folder.
- Find Terminal in the Utilities folder and launch it.
- Type the following command (!without the full stop): pip uninstall pip.
- Press Return.
- Confirm by typing Y.
- Press Return.
![To remove pip on Mac, launch Finder, select Applications and open Utilities. To remove pip on Mac, launch Finder, select Applications and open Utilities.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_67a416849d.png)
![To uninstall pip on MacBook, launch Terminal. To uninstall pip on MacBook, launch Terminal.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_d8b9b88bd0.png)
![To finalize the uninstallation of pip on Mac, type this command: pip uninstall pip. To finalize the uninstallation of pip on Mac, type this command: pip uninstall pip.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_7a5a2accd0.png)
Important:
Meanwhile, to gain even more valuable space on your MacBook, check our other relevant article to uninstall Anaconda from Mac if you have any issues with its performance.
Best way to install pip on macOS
Are you looking to use pip install on Mac? There are various methods to install pip on macOS, each with its own advantages and disadvantages. However, our team of experts recommends using ensurepip, as it’s a simple and easy method that doesn’t require an Internet connection and is compatible with many Python versions.
Regardless of the method you choose, you should always prepare your computer before downloading and installing a new program on Mac. You can use a tool like MacKeeper’s Smart Uninstaller to ensure that the installation process doesn’t impact negatively your Mac’s performance. Try this:
- Launch the MacKeeper app on your device.
- Choose the Smart Uninstaller tab under the Cleaning section on the left-side menu.
- Click the Start Scan button.
- Then, select the categories you want to do a smart cleaning and click Remove Selected.
- Wait until the scan is complete.
- Click Remove to confirm.
![To use Smart Uninstaller, launch MacKeeper, select Smart Uninstaller and hit the Start Scan button. To use Smart Uninstaller, launch MacKeeper, select Smart Uninstaller and hit the Start Scan button.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_201798e7a4.png)
![While you've opened MacKeeper's Smart Uninstaller, select the categories you want to clean and click Remove Selected. While you've opened MacKeeper's Smart Uninstaller, select the categories you want to clean and click Remove Selected.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_b0b606d0ad.png)
![To complete the file removal with MacKeeper's Smart Uninstaller, wait until the scan is done. To complete the file removal with MacKeeper's Smart Uninstaller, wait until the scan is done.](https://static-cdn.mackeeper.com/mk-blog-upload/images/new_cf81a93bbb.png)