title: How to setup up PYTHON_EGG_CACHE environment variable on Mac?
body: <p>I am trying to setup Django to use MySQL. I am getting the following error when I type in <code>localhost/mysite</code></p>
  
  <pre><code>ExtractionError at /
  Can't extract file(s) to egg cache
  
  The following error occurred while trying to extract file(s) to the Python egg
  cache:
  
    [Errno 13] Permission denied: '/Library/WebServer/.python-eggs'
  
  The Python egg cache directory is currently set to:
  
    /Library/WebServer/.python-eggs
  
  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.
  </code></pre>
  
  <p>From the error message I know that I have to change the <code>PYTHON_EGG_CACHE</code> environment variable to point to a directory that Apache can access. I tried adding the following to <code>httpd.conf</code> </p>
  
  <pre><code>SetEnv PYTHON_EGG_CACHE /var/www
  &lt;Directory /var/www&gt;
      Order deny,allow
      Allow from all
  &lt;/Directory&gt;
  </code></pre>
  
  <p>and also just <code>SetEnv PYTHON_EGG_CACHE /var/www</code> to <code>bashrc</code>, but nothing seems to resolve the problem. Any suggestions on what I might be doing wrong?</p>
  
  <p>Note: <code>www</code> is a folder that I created</p>