title: Python easy_install in a virtualenv gives setuptools error
body: <p>There are a number of other StackOverflow questions similar to this one, but in each case, the platform was different or the error message was different or the solution had no effect or was outdated. I am trying to set up a Python 2.7.6 virtualenv and install modules into it but easy_install gives me errors indicating that setuptools is not available. But AFAIK easy_install is part of setuptools, so this makes no sense. </p>
  
  <p>The problem only happens in a virtualenv. Here's what I've done:</p>
  
  <ul>
  <li>Created a brand new Red Hat 5 virtual machine</li>
  <li>Did a <code>yum -y update</code> to get the latest stuff, rebooted</li>
  <li>Downloaded Python-2.7.6.tar.gz, unzipped, <code>./configure; make; sudo make install</code></li>
  <li>Confirmed that <code>python -V</code> gives me 2.7.6 and <code>sudo python -V</code> also gives me 2.7.6</li>
  <li><code>wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py</code></li>
  <li>Modified ez_setup.py to add the <code>--no-check-certificate</code> flag to wget to get around proxy server problems in our network</li>
  <li><code>sudo python ez_setup.py</code></li>
  <li><code>sudo easy_install pip</code></li>
  <li><code>sudo pip install virtualenv</code></li>
  <li><code>virtualenv virtpy</code></li>
  <li><code>. virtpy/bin/activate</code></li>
  <li><code>easy_install elementtree</code></li>
  </ul>
  
  <p>All of these steps succeed except for the last one, which fails with:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/gperrow/virtpy/bin/easy_install", line 7, in &lt;module&gt;
      from setuptools.command.easy_install import main
    File "/home/gperrow/virtpy/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 44, in &lt;module&gt;
      from setuptools.package_index import PackageIndex
    File "/home/gperrow/virtpy/lib/python2.7/site-packages/setuptools/package_index.py", line 203, in &lt;module&gt;
      sys.version[:3], require('setuptools')[0].version
    File "/usr/local/bin/scripts/pkg_resources.py", line 584, in require
      needed = self.resolve(parse_requirements(requirements))
    File "/usr/local/bin/scripts/pkg_resources.py", line 482, in resolve
      raise DistributionNotFound(req)  # XXX put more info here
  pkg_resources.DistributionNotFound: setuptools
  </code></pre>
  
  <p>I'm starting with a clean VM and I've done nothing really unusual but I'm finding "easy_install" anything but. Am I doing something wrong or am I missing one or more steps?</p>