Tuesday, May 14, 2013

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 
    

No comments: