WSGI / APACHE – “ImportError:No module named site”

我正在尝试使用WSGI来启动并运行一个django网站。 这个盒子用python 2.6运行centos 5。

我试图使用安装在/ usr / local / lib / anaconda /中的连续分析的anaconda分发。

我build立了mod_wsgi ./configure –with-python = / usr / local / lib / anaconda / bin / python /

我将以下内容添加到/etc/httpd/conf/httpd.conf中:

<Directory "/var/www/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> #wsgi-scripts WSGIPythonHome /usr/local/lib/anaconda/bin WSGIScriptAlias /test /var/www/wsgi-scripts/test <Directory "/var/www/wsgi-scripts"> Order allow,deny Allow from all </Directory> 

但我得到的import失败如下:

 [Fri Mar 08 16:44:24 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_wsgi/3.4 Python/2.7.3 configured -- resuming normal operations [Fri Mar 08 16:44:24 2013] [info] Server built: Feb 13 2012 22:31:42 ImportError: No module named site Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> 

任何人都可以指出我的问题是什么?