Install Pip Python

By admin ·
1

Install pip on macOS

There are a few options to install pip on MacOS:

Option 1: Use Homebrew (recommended)

Install Homebrew

Homebrew is one of the better package managers for Mac. To install Homebrew, open Terminal and type:

How to Install Homebrew on Mac

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Read more here.

Install pip using Homebrew

Using Homebrew to install python will install the latest Python (Python 3.7 currently), pip, and Setuptools.

brew install python

Option 2: Use easy_install

easy_install is the predecessor to pip, and it comes preinstalled on macOS (along with Python 2). You can use easy_install to install pip for Python 2.

sudo easy_install pip
2

Install pip on Windows

Download the installer script

Right click on this installer script and select Save As….

Run the installer script

Open the Command Prompt, then navigate to the directory where you downloaded the script.

Now run:

python get-pip.py
3

Install pip on Linux

The command to install pip on Linux will vary based on the distribution you’re using (and the package manager). Below I’ll list the common package managers.

APT (Advanced Packaging Tool)

Python 2.x

sudo apt-get install python-pip

Python 3.x

sudo apt-get install python3-pip

Pacman

Python 2.x

sudo pacman -S python2-pip

Python 3.x

sudo pacman -S python-pip

Yum

Python 2.x

sudo yum upgrade python-setuptools
sudo yum install python-pip python-wheel

Python 3.x

sudo yum install python3 python3-wheel
4

Learn how to install Python packages using pip