How to install the Python package manager pip

The Python Package Index (PyPI) is a repository of software for the Python programming language. pip is package manager for Python that manages the installation of modules hosted on PyPI. I recommend using pip to install Python modules over downloading the source directly because it also provides an easy method to update and remove packages. Here I’ll describe how to install pip on various operating systems.

Basic pip Usage

Install the two packages python-registry and python-evtx:

pip install python-registry python-evtx

Upgrade the two packages python-registry and python-evtx:

pip install --upgrade python-registry python-evtx

Remove the two previously installed packages python-registry and python-evtx:

pip uninstall python-registry python-evtx

Installing on Windows

Christoph Gohlke prepares Windows installers for popular Python packages. He builds installers for Python 2 and 3, for both 32-bit and 64-bit architectures. Pick and install the appropriate versions of both the following two installers:

Incidentally, I highly recommend these Windows installers for Python modules that have a binary component, such as lxml.

Installing on Linux (Debian/Ubuntu)

Use apt-get to install python-pip:

sudo apt-get install python-pip

Installing on Linux (Fedora)

Use yum to install python-pip:

sudo yum install python-pip

Installing on Linux (Other)

Do the following two steps in order:

  1. Download and run the script ez_setup.py
  2. Download and run the script get-pip

Installing on OSX (Homebrew)

pip is distributed with python when you install via brew:

brew install python

Installing on OSX (Other)

Install pip using easy_install, which should be included with python:

sudo easy_install python
Back