Saltycrane logo

SaltyCrane Blog

Notes on Python, Django, and web development on Ubuntu Linux

    

How to install pip on Ubuntu

Pip is a better alternative to Easy Install for installing Python packages. It is most "nutritious" when used with its companion virtualenv. For more information on pip and virtualenv see my blog post: Notes on using pip and virtualenv with Django.

Install pip and virtualenv for Ubuntu 10.10 Maverick and newer

$ sudo apt-get install python-pip python-dev build-essential 
$ sudo pip install --upgrade pip 
$ sudo pip install --upgrade virtualenv 

For older versions of Ubuntu

  • Install Easy Install
    $ sudo apt-get install python-setuptools python-dev build-essential 
    
  • Install pip
    $ sudo easy_install pip 
    
  • Install virtualenv
    $ sudo pip install --upgrade virtualenv 
    

4 Comments — feed icon Comments feed for this post


#1 bob commented on 2010-03-19:

too bad the version in the ubuntu reps is old as hell


#2 Charles Merriam commented on 2010-08-03:

The next step should be:

$ pip install --upgrade pip


#3 pqs commented on 2010-10-29:

This also works on Debian Lenny :-)


#4 Eliot commented on 2011-03-27:

Charles: Thanks. I updated the post to include upgrading pip.

Post a comment

Required
Required, but not displayed
Optional

Format using Markdown. (No HTML.)
  • Code blocks: prefix each line by at least 4 spaces or 1 tab (and a blank line before and after)
  • Code span: surround with backticks
  • Blockquotes: prefix lines to be quoted with >
  • Links: <URL>
  • Links w/ description: [description](URL)
Created with Django | Hosted by Slicehost