title: python: what happens during easy_install?
body: <p>I'm a little confused about egg files and installing them using easy_install, hope you can help me with it. (I read about people's recommendation on pip, but I'll like to understand this before I move on).</p>
  
  <p>If I simply copy e,g <code>django_guardian-1.0.2-py2.6.egg</code> from say, a thumbdrive  and place in e.g <code>~/bar/</code> which PYTHONPATH was pointing to, trying to import the contents via <code>import guardian</code> would yield me importError. This error occur even if I have the <code>easy_install.pth</code> copied in</p>
  
  <pre><code>import sys; sys.__plen = len(sys.path)
  ./django_guardian-1.0.2-py2.6.egg
  import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys
  '__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)
  </code></pre>
  
  <p>Now, using <code>easy_install django-guardian</code>, of course had no such problem. </p>
  
  <p>I navigated to the directory the egg file was easy_installed to, and all it contains was the <code>.pth</code> and the <code>.egg</code> file. I wish to know what other procedures/entries does easy_install makes somewhere that makes the first method unusable....</p>