如何针对python 2.7.5编译mod_wsgi(版本3.2) - 精确的步骤

时间:2015-02-16 07:10:09

标签: linux django apache mod-wsgi

我试图针对python 2.7.5编译mod_wsgi(版本3.2)。我试图在亚马逊linux图像中使用apache运行Django作为wsgi应用程序,默认情况下它带有python 2.6.9。有什么步骤来编译mod_wsgi对python 2.7.5而不是2.6.9,如日志中所示。我已经安装了python 2.7.5!

但是我收到以下错误:

> [Mon Feb 16 03:59:30 2015] [notice] Apache/2.2.29 (Unix) mod_wsgi/3.2
> Python/2.6.9 DAV/2 PHP/5.3.29 mod_ssl/2.2.29 OpenSSL/1.0.1k-fips
> mod_perl/2.0.7 Perl/v5.16.3 configured -- resuming normal operations
> [Mon Feb 16 03:59:39 2015] [error] [client 73.222.21.30] mod_wsgi
> (pid=24542): Target WSGI script
> '/var/www/djangocode/DevOpsAccelerator/DevOpsAccelerator/wsgi.py'
> cannot be loaded as Python module. [Mon Feb 16 03:59:39 2015] [error]
> [client 73.222.21.30] mod_wsgi (pid=24542): Exception occurred
> processing WSGI script
> '/var/www/djangocode/DevOpsAccelerator/DevOpsAccelerator/wsgi.py'.
> [Mon Feb 16 03:59:39 2015] [error] [client 73.222.21.30] Traceback
> (most recent call last): [Mon Feb 16 03:59:39 2015] [error] [client
> 73.222.21.30]   File "/var/www/djangocode/DevOpsAccelerator/DevOpsAccelerator/wsgi.py",
> line 13, in <module> [Mon Feb 16 03:59:39 2015] [error] [client
> 73.222.21.30]     from django.core.wsgi import get_wsgi_application [Mon Feb 16 03:59:39 2015] [error] [client 73.222.21.30]   File
> "/usr/lib/python2.6/site-packages/django/core/wsgi.py", line 2, in
> <module> [Mon Feb 16 03:59:39 2015] [error] [client 73.222.21.30]    
> from django.core.handlers.wsgi import WSGIHandler [Mon Feb 16 03:59:39
> 2015] [error] [client 73.222.21.30]   File
> "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line
> 11, in <module> [Mon Feb 16 03:59:39 2015] [error] [client
> 73.222.21.30]     from django import http [Mon Feb 16 03:59:39 2015] [error] [client 73.222.21.30]   File
> "/usr/lib/python2.6/site-packages/django/http/__init__.py", line 2, in
> <module> [Mon Feb 16 03:59:39 2015] [error] [client 73.222.21.30]    
> from django.http.request import (HttpRequest, QueryDict, [Mon Feb 16
> 03:59:39 2015] [error] [client 73.222.21.30]   File
> "/usr/lib/python2.6/site-packages/django/http/request.py", line 11, in
> <module> [Mon Feb 16 03:59:39 2015] [error] [client 73.222.21.30]    
> from django.conf import settings [Mon Feb 16 03:59:39 2015] [error]
> [client 73.222.21.30]   File
> "/usr/lib/python2.6/site-packages/django/conf/__init__.py", line 9, in
> <module> [Mon Feb 16 03:59:39 2015] [error] [client 73.222.21.30]    
> import importlib [Mon Feb 16 03:59:39 2015] [error] [client
> 73.222.21.30] ImportError: No module named importlib [Mon Feb 16 06:52:02 2015] [notice] caught SIGTERM, shutting down

0 个答案:

没有答案