title: Unable to use easy_install to install Python modules
body: <p>I am trying to use <code>easy_install</code> to install a module called <strong>requests</strong> by doing </p>
  
  <pre><code>easy_install requests
  </code></pre>
  
  <p>This worked fine a week ago when I was using Python 2.6.5 but today I installed Python 2.7.2 and then tried to <code>import requests</code> in one of my scripts but it failed. I then tried reinstalling requests with <code>easy_install requests</code> but got this error </p>
  
  <pre><code>install_dir /usr/local/lib/python2.6/dist-packages/
  error: can't create or remove files in install directory
  
  The following error occurred while trying to add or remove files in the
  installation directory:
  
      [Errno 13] Permission denied: '/usr/local/lib/python2.6/dist-packages/test-easy-install-15207.pth'
  
  The installation directory you specified (via --install-dir, --prefix, or
  the distutils default setting) was:
  
      /usr/local/lib/python2.6/dist-packages/
  
  Perhaps your account does not have write access to this directory?  If the
  installation directory is a system-owned directory, you may need to sign in
  as the administrator or "root" account.  If you do not have administrative
  access to this machine, you may wish to choose a different installation
  directory, preferably one that is listed in your PYTHONPATH environment
  variable.
  
  For information on other options, you may wish to consult the
  documentation at:
  
    http://packages.python.org/distribute/easy_install.html
  
  Please make the appropriate changes for your system and try again.
  </code></pre>
  
  <p>So I was told to go reinstall easy_install and I went to <a href="http://pypi.python.org/pypi/setuptools" rel="noreferrer">http://pypi.python.org/pypi/setuptools</a> and learned I had to </p>
  
  <blockquote>
    <p>delete all setuptools*.egg and setuptools.pth files from your
    system's site-packages directory (and any other sys.path directories)
    FIRST.</p>
  </blockquote>
  
  <p>So I did this. I then reinstalled setuptools from the <code>setuptools-0.6c11-py2.7.egg</code>. It seemed successful but when I ran <code>easy_install requests</code> I got basically the same error except the directory python2.6/dist-packages is now python2.7/site-packages</p>
  
  <pre><code>siddhion@siddhion-laptop:~$ easy_install requests
  error: can't create or remove files in install directory
  
  The following error occurred while trying to add or remove files in the
  installation directory:
  
      [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/test-easy-install-16253.write-test'
  
  The installation directory you specified (via --install-dir, --prefix, or
  the distutils default setting) was:
  
      /usr/local/lib/python2.7/site-packages/
  
  Perhaps your account does not have write access to this directory?  If the
  installation directory is a system-owned directory, you may need to sign in
  as the administrator or "root" account.  If you do not have administrative
  access to this machine, you may wish to choose a different installation
  directory, preferably one that is listed in your PYTHONPATH environment
  variable.
  
  For information on other options, you may wish to consult the
  documentation at:
  
    http://peak.telecommunity.com/EasyInstall.html
  
  Please make the appropriate changes for your system and try again.
  </code></pre>
  
  <p>Also, when I do <code>easy_install</code> and press tab I get these options </p>
  
  <pre><code>easy_install      easy_install-2.6  easy_install-2.7
  </code></pre>
  
  <p>How come easy_install-2.6 is there?</p>
  
  <p>and</p>
  
  <p><em>How do I get easy-install working again?</em></p>