title: Installation of pysftp via pip failed (because of 2 python2.x versions?)
body: <p>My Ubuntu 10.04 came with Python 2.6. Now, I also installed Python 2.7, which is the system default now because when I start <code>python</code> from the terminal, it starts python 2.7.</p>
  
  <p>Now, I want to install the library pysftp using pip, but I'm having a hard time doing so. Below follow some results of my attempts and conclusions. I did <code>pip install pysftp</code>, but it says the following:</p>
  
  <pre><code>Downloading/unpacking pysftp
    Running setup.py egg_info for package pysftp
      Traceback (most recent call last):
        File "&lt;string&gt;", line 3, in &lt;module&gt;
        File "/usr/local/lib/python2.6/dist-packages/setuptools/__init__.py", line 12, in &lt;module&gt;
          from setuptools.extension import Extension
        File "/usr/local/lib/python2.6/dist-packages/setuptools/extension.py", line 8, in &lt;module&gt;
          from .dist import _get_unpatched
        File "/usr/local/lib/python2.6/dist-packages/setuptools/dist.py", line 21, in &lt;module&gt;
          packaging = pkg_resources.packaging
      AttributeError: 'module' object has no attribute 'packaging'
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
  
    File "&lt;string&gt;", line 3, in &lt;module&gt;
  
    File "/usr/local/lib/python2.6/dist-packages/setuptools/__init__.py", line 12, in &lt;module&gt;
  
      from setuptools.extension import Extension
  
    File "/usr/local/lib/python2.6/dist-packages/setuptools/extension.py", line 8, in &lt;module&gt;
  
      from .dist import _get_unpatched
  
    File "/usr/local/lib/python2.6/dist-packages/setuptools/dist.py", line 21, in &lt;module&gt;
  
      packaging = pkg_resources.packaging
  
  AttributeError: 'module' object has no attribute 'packaging'
  
  ----------------------------------------
  Command python setup.py egg_info failed with error code 1
  Storing complete log in ./pip-log.txt
  </code></pre>
  
  <p>It seems to me that pip (which was obviously installed before Python 2.7 was installed) links to the old version of Python, which doesn't support pysftp. Also because when I do <code>pip --version</code> it says:</p>
  
  <pre><code>pip 0.3.1 from /usr/lib/python2.6/dist-packages (python 2.6)
  </code></pre>
  
  <p>When I do <code>whereis python</code>, it gives me the following information:</p>
  
  <pre><code>python: /usr/src/Python-2.7.10/python /usr/bin/python2.6 /usr/bin/python /etc/python2.6 /etc/python /usr/lib/python2.6 /usr/lib/python3.1 /usr/lib64/python2.6 /usr/lib64/python3.1 /usr/local/bin/python2.7-config /usr/local/bin/python /usr/local/bin/python2.7 /usr/local/lib/python2.6 /usr/local/lib/python2.7 /usr/include/python2.6 /usr/share/python /usr/share/man/man1/python.1.gz
  </code></pre>
  
  <p>How can I install pysftp?</p>