DEV Community

Cover image for How to install pip3 on mac
Stan ku2ck4
Stan ku2ck4

Posted on

How to install pip3 on mac

What is it about

Most of the installations you are going to use during your developer processes use PIP3 especially when you dig into the programming language Python.

The reason is simple, PIP is a package manager for this language. It allows you to manage libraries and dependencies that are added to the standard library, but not just that. It helps you to install those whos are missing during your development process.

Difference between PIP and PIP3

As these are more likely to look like shortcuts to something they are. PIP is a recursive acronym that stands for PIP install packages.

PIP is understood as a soft link for a particular installer. Your operation system will use one of your Python versions depending on what exactly is known as first in the system PATH variable.

To know what it is and where it is on this particular path it simply types this command to view the system file.

nano ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

When you run the PIP3 command, you can be sure that this particular module or dependency will be installed in Python3.

How to install with Brew

If you installed previously most of the stuff on your mac with help of Brew then this command is for you. If not start simply by adding this command from https://brew.sh/ into the terminal prompt.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Enter fullscreen mode Exit fullscreen mode

This first installation process is awkwardly long, but don't get bored. Just wait and approve by entering what does it ask for. Then just go ahead with this simple command.

brew install python3
Enter fullscreen mode Exit fullscreen mode

You can check the version of your PIP3 by entering this straightforward code as -V stays for the version number to request.

pip3 -V
Enter fullscreen mode Exit fullscreen mode

You'll receive a PIP3 version number with a path to the last installation process.

Installation as another way around

You can make it without using brew just simply downloading an official file from Python Packaging Authority - Pypa.io.

curl -O https://bootstrap.pypa.io/get-pip.py
Enter fullscreen mode Exit fullscreen mode

And then after simply executing installation with the command mentioned hereunder.

sudo python3 get-pip.py
Enter fullscreen mode Exit fullscreen mode

The installation will pass and here you are. PIP3 is on your system as final. Ready to install and roll out your new python script with help of libraries and dependencies.

Thanks to Andrew Ruiz for the cover image from Unsplash.

Discussion (0)