2012-02-02 74 views
1

我想設置Django來使用MySQL。我收到以下錯誤,當我在localhost/mysite如何在Mac上設置PYTHON_EGG_CACHE環境變量?

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. 

鍵入從我知道我必須改變PYTHON_EGG_CACHE環境變量指向Apache可以訪問目錄的錯誤消息。我嘗試添加以下到httpd.conf

SetEnv PYTHON_EGG_CACHE /var/www 
<Directory /var/www> 
    Order deny,allow 
    Allow from all 
</Directory> 

,也只是SetEnv PYTHON_EGG_CACHE /var/wwwbashrc,但似乎沒有任何解決問題。有關我可能會做錯什麼的建議?

注:www是我創建

回答

1

根據你前面的問題,您正在使用WSGI的文件夾。您需要WSGIPythonEggspython-eggs選項WSGIDaemonProcess

+1

我嘗試這個發現,我得到一個500錯誤。 – David 2012-02-02 05:20:39