How to install pip on Linux

Question: I want to use pip to install Python packages. However, when I run pip, it says "pip: command not found". How can I install pip on [insert your Linux distro]?

There are various ways to install and manage Python packages. One of the easiest way is to use pip command line tool. Using pip, you can install/update/uninstall a Python package, as well as list all installed (or outdated) packages from the command line.

To install pip on Ubuntu, Debian or Linux Mint:

$ sudo apt-get install python-pip

To install pip on Fedora:

$ sudo yum install python-pip

To install pip on CentOS, first enable EPEL repository, and then run:

$ sudo yum install python-pip

To install pip on Archlinux:

$ sudo pacman -S python-pip

Subscribe to Ask Xmodulo

Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.

Leave a comment

Your email address will not be published. Required fields are marked *

Current ye@r *