title: How to use pip with new Python version?
body: <p>I have python2.6 as my default python and I've been using distribute easy_install to install packages in <code>~/.local</code>. easy_install has many issues and I'd like to switch to pip, while at the same time upgrading to python2.7 from python2.6.  My existing pip version is tied to python2.6 and always looks in <code>~/.local/lib/python2.6</code> for packages.  This means I have to install pip again with Python2.7 but it seems like this cannot be done with the existing python2.6 pip, right?</p>
  
  <p>Therefore I tried to download pip and install it like this:</p>
  
  <pre><code>python2.7 setup.py install --prefix=~/.local
  </code></pre>
  
  <p>Note that I do not have root, so I have to install pip locally. When I try this I get:</p>
  
  <pre><code>Traceback (most recent call last):
    File "setup.py", line 5, in &lt;module&gt;
      from setuptools import setup
  ImportError: No module named setuptools
  </code></pre>
  
  <p>How can I fix this situation? I obviously cannot install setuptools with pip, because I can't install pip... all I want to do is link up pip with python2.7, upgrade pip and then install everything with pip and forget about easy_install and the old python2.6 and its packages.  </p>
  
  <p>When I try the answer below, I get:</p>
  
  <pre><code>The installation directory you specified (via --install-dir, --prefix, or
  the distutils default setting) was:
  
      /home/user/.local/lib/python2.7/site-packages
  
  This directory does not currently exist.  Please create it and try again, or
  choose a different installation directory (using the -d or --install-dir
  option).
  </code></pre>
  
  <p>I had to manually create (with <code>mkdir</code>) the directory:</p>
  
  <pre><code>~/.local/lib/python2.7/site-packages
  </code></pre>
  
  <p>This seems broken... it worked once I did it, but why does it require manual creation of a directory? </p>
  
  <p>thanks.</p>