How to setup up PYTHON_EGG_CACHE environment variable on Mac?
10,821
Solution 1
Also might try to set the egg cache directory in the wsgi script,
import os
os.environ['PYTHON_EGG_CACHE'] = '/usr/local/pylons/python-eggs'
as can be found from here http://code.google.com/p/modwsgi/wiki/ApplicationIssues
Solution 2
Based on your previous question, you're using WSGI. You want WSGIPythonEggs
or the python-eggs
option for WSGIDaemonProcess
.
Author by
David
Updated on June 30, 2022Comments
-
David almost 2 years
I am trying to setup Django to use MySQL. I am getting the following error when I type in
localhost/mysite
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.
From the error message I know that I have to change the
PYTHON_EGG_CACHE
environment variable to point to a directory that Apache can access. I tried adding the following tohttpd.conf
SetEnv PYTHON_EGG_CACHE /var/www <Directory /var/www> Order deny,allow Allow from all </Directory>
and also just
SetEnv PYTHON_EGG_CACHE /var/www
tobashrc
, but nothing seems to resolve the problem. Any suggestions on what I might be doing wrong?Note:
www
is a folder that I created