title: What is the Python egg cache (PYTHON_EGG_CACHE)?
body: <p>I've just upgraded from Python 2.6.1 to 2.6.4 on my development machine and upon starting a python script was presented with the following message:</p>
  
  <blockquote>
    <p>Can't extract file(s) to egg cache</p>
    
    <p>The following error occurred while
    trying to extract file(s) to  the
    Python egg cache:</p>
    
    <p>[Errno 13] Permission denied:
    '/var/www/.python-eggs'</p>
    
    <p>The Python egg cache directory is
    currently set to:</p>
    
    <p>/var/www/.python-eggs</p>
    
    <p>Perhaps your account does not have
    write access to this directory?   You
    can change the cache directory by
    setting the PYTHON_EGG_CACHE 
    environment variable to point to an
    accessible directory.</p>
  </blockquote>
  
  <p>There isn't anything in the <a href="http://docs.python.org/search.html?q=PYTHON_EGG_CACHE&amp;check_keywords=yes&amp;area=default" rel="noreferrer">python docs</a> so I'm at a bit of a loss regarding best-practices on where to put this directory and what it's used for.</p>
  
  <p>Can someone explain what the Python egg cache is?</p>
  
  <p>Also, can you explain why/how it is different to the <code>site-packages</code> directory Python uses to store eggs (as I understand it)?</p>