Install Pip Python
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 pythonOption 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 pipInstall 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.pyInstall 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-pipPython 3.x
sudo apt-get install python3-pipPacman
Python 2.x
sudo pacman -S python2-pipPython 3.x
sudo pacman -S python-pipYum
Python 2.x
sudo yum upgrade python-setuptools
sudo yum install python-pip python-wheelPython 3.x
sudo yum install python3 python3-wheelLearn how to install Python packages using pip
Now that pip is installed, learn how to install Python packages using pip.