Low Orbit Flux Logo 2 F

Linux How To Install Pip

Pip is a standard tool for installing Python libraries.

Ubuntu / Debian

You should probably already have it but if not you can install pip on Ubuntu/Debian like this. Using python-pip will give you the Python 2 version and python3-pip is for Python 3.


sudo apt update
sudo apt install python-pip
sudo apt install python3-pip

RHEL / Fedora / CentOS

You can install these same packages on Red Hat / Fedora / Cent OS systems like this:


sudo dnf install python2-pip
sudo dnf install python3-pip

For older Red Hat systems:


sudo yum update -y
sudo yum install -y python2-pip
sudo yum install -y python3-pip

Arch Linux / Manjaro

Installing pip is pretty easy on Arch Linux and Manjaro. Use either of the following.


sudo pacman -S python2-pip   # pip2/python2
sudo pacman -S python-pip    # pip3/python3

Manual

If you are using a system managed Python you probably shouldn’t use these tools. You should use your system package manager.

Python 3.4 and up comes with the ensurepip module that can be used to install or update pip. This is disabled for the system Python on Ubuntu/Debian.


python -m ensurepip --upgrade

You can also use this method.


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