title: Python - egg cache extraction error - permission denied - Apache not seeing SetEnv?
body: <p>I'm trying to set up Apache with mod_wsgi to run Django on a Red Hat box but I'm getting the dreaded "Permission denied: '/home/pineg/.python-eggs'" egg cache extraction error.</p>
  
  <p>I did what it said and made this the first line:</p>
  
  <pre><code>SetEnv PYTHON_EGG_CACHE /opt/tmp
  </code></pre>
  
  <p>in <em>/etc/httpd/conf/httpd.conf</em></p>
  
  <p>And restarted Apache: </p>
  
  <pre><code>&gt;sudo /etc/init.d/httpd restart
  </code></pre>
  
  <p>But I'm still getting the same error (below).  It's almost like Apache is ignoring my SetEnv.</p>
  
  <pre><code>[Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] The following error occurred while trying to extract file(s) to the Python egg
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] cache:
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] 
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561]   [Errno 13] Permission denied: '/home/pineg/.python-eggs'
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] 
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] The Python egg cache directory is currently set to:
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] 
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561]   /home/pineg/.python-eggs
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] 
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] Perhaps your account does not have write access to this directory?  You can
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] change the cache directory by setting the PYTHON_EGG_CACHE environment
  [Fri May 06 10:08:37 2011] [error] [client 10.101.11.561] variable to point to an accessible directory.
  </code></pre>