Apache2.2:ImportError: No Module Named Site
Apache2 error.log: [Thu Dec 17 18:58:33 2015] [warn] mod_wsgi: Compiled for Python/2.7.2+. [Thu Dec 17 18:58:33 2015] [warn] mod_wsgi: Runtime using Python/2.7.3. [Thu Dec 17 18:58
Solution 1:
For ones that step on this question (like me) because you are facing a problem with endless:
ImportError: No module named site
in apache's error.log (/var/log/apache2/error.log)
most probably you have WSGIPythonHome
pointing to some other (presumably) python location. Default setting IS:
WSGIPythonHome /usr
And what people forget to mention is where this supposed to be it is in:
/etc/apache2/mods-enabled/wsgi.conf
this file usually starts with:
<IfModule mod_wsgi.c>
#This config file is provided to give an overview of the directives,
#which are only allowed in the 'server config' context.
#For a detailed description of all avaiable directives please read
#http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives
Somewhere there you put:
WSGIPythonHome /usr
or
WSGIPythonHome /usr/local
or (the best option) remove or comment this setting because /usr suppose to be default setting and use built in python.
or
change, mess up or fix what ever you have messed up with wsgi configuration (like I do when I try to make something work or break and do not know enough ;) )
Post a Comment for "Apache2.2:ImportError: No Module Named Site"