Install pip3 on Mac

Muhammad Maisam Abbas Jan 30, 2023 Jun 07, 2021
  1. Install pip3 on Mac With the get-pip.py File
  2. Install Pip3 on Mac With the Homebrew Package Manager
Install pip3 on Mac

You can use two primary methods to install pip3 on Mac through Python: the get-pip.py file and the Homebrew package manager. This tutorial will introduce and demonstrate these methods to help you install pip3 on your Mac device.

Install pip3 on Mac With the get-pip.py File

The pip3 is a package manager used to manage packages written in the Python programming language. To install the pip3 package manager, we have to download the get-pip.py file first and save it in the directory of the Python installation. Use the command below to download the get-pip.py file.

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

Now, we just have to run the get-pip.py file, and it would automatically install the pip3 package manager on our Mac device. The command to run the get-pip.py file is given below.

python3 get-pip.py

After installing the pip3 package manager, we must verify that the installation was completed successfully. To verify the pip3 package manager, use the command given below.

pip3 --version

This command will give us the version of the current installation of the pip3 package manager on our Mac device.

Install Pip3 on Mac With the Homebrew Package Manager

Instead of downloading the get-pip.py file first and then running it, you can use the Homebrew package manager to install any missing packages on your Mac. The command to install the pip3 package manager with the Homebrew package manager is given below.

brew install python3

The code above installs the latest versions of python3 and pip3 on Mac. To verify the installation of the pip3 package manager, we can use the command here.

pip3 --version

The above command will give us the version of the current installation of the pip3 package manager on your Mac device.

Both methods discussed above work just fine, but the first method is more time-consuming and complex. We recommend the Homebrew method to install pip3 and/or python3 on Mac with ease. The get-pip.py file method is only recommended if, for some reason, the Homebrew method does not work.

Muhammad Maisam Abbas avatar Muhammad Maisam Abbas avatar

Maisam is a highly skilled and motivated Data Scientist. He has over 4 years of experience with Python programming language. He loves solving complex problems and sharing his results on the internet.

LinkedIn

Related Article - Python Installation