Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to get a django website up and running using WSGI. The box is running centos 5 with python 6.

I am attempting to use the anaconda distribution from continuum analytics installed in /usr/local/lib/anaconda/.

I built mod_wsgi with ./configure --with-python=/usr/local/lib/anaconda/bin/python/

I added the following to /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>

but I am getting import failures as follows:

[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>

Could anyone point out what my issue is?

share|improve this question
    
echo $PYTHONPATH? –  quanta Mar 9 '13 at 1:37
    
where would I echo $PYTHONPATH? –  Michael WS Mar 9 '13 at 2:30
    
Run it from the command line. –  quanta Mar 9 '13 at 2:34
    
ok so, I have an apache user and it is undefined for it. What should I do? Should adding it to the path or pythonpath of the user fix it? –  Michael WS Mar 9 '13 at 16:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.