Question also appeared on StackOverflow and was resolved there. http://stackoverflow.com/questions/39171616/ubuntu-apache2-django-fatal-python-error-py-initialize-unable-to-get-the <http://stackoverflow.com/questions/39171616/ubuntu-apache2-django-fatal-python-error-py-initialize-unable-to-get-the>
The WSGIPythonHome value was wrong. If it is set it is supposed to be the value of sys.prefix for a Python installation, if setting it is even necessary, which in this case it wouldn’t have. Graham > On 27 Aug 2016, at 3:03 AM, 이경문 <[email protected]> wrote: > > I'm trying to set up my django(1.8) application with Ubuntu 14.04 , Apache2 > and python 3.4.3. > > When I run 'sudo service apache2 start' , the page keeps re-loading and the > same error message is stacking at '/var/log/apache2/error.log'. > > The error message is below : > [Fri Aug 26 16:49:24.387805 2016] [mpm_event:notice] [pid 2818:tid > 139897210853248] AH00489: Apache/2.4.7 (Ubuntu) mod_wsgi/4.5.5 Python/3.4.3 > configured -- resuming normal operations > [Fri Aug 26 16:49:24.387868 2016] [core:notice] [pid 2818:tid > 139897210853248] AH00094: Command line: '/usr/sbin/apache2' > Fatal Python error: Py_Initialize: Unable to get the locale encoding > ImportError: No module named 'encodings' > > My configuration file is below : > '/etc/apache2/apache2.conf' > : ~ Include /etc/apache2/httpd.conf > > '/etc/apache2/httpd.conf' > : > WSGIScriptAlias / /home/ubuntu/Project/Project/Project/wsgi.py > WSGIDaemonProcess soongonara python-path=/home/ubuntu/Project/Project > WSGIProcessGroup Project > WSGIPythonHome /usr/bin/python3.4 > > <Directory /home/ubuntu/Project/Project/Project> > <Files wsgi.py> > Require all granted > </Files> > </Directory> > > Alias /static/ /home/ubuntu/Project/Project/deploy_to_server/ > <Directory /home/ubuntu/Project/Project/deploy_to_server> > Require all granted > </Directory> > > > I think everything is done , why does this error come to me? Please help me > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/modwsgi > <https://groups.google.com/group/modwsgi>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
