ImportError:没有名为django.core.wsgi的模块

时间:2016-02-08 13:35:30

标签: python django centos mod-wsgi

以下是错误日志的快照

mod_wsgi (pid=12320): Target WSGI script '/var/www/firstweb/firstweb/wsgi.py' cannot be loaded as Python module.
mod_wsgi (pid=12320): Exception occurred processing WSGI script
'/var/www/firstweb/firstweb/wsgi.py'.
Traceback (most recent call last):
File "/var/www/firstweb/firstweb/wsgi.py", line 6, in ?
   import django.core.handlers.wsgi 
ImportError: No module named django.core.handlers.wsgi

配置:Python 2.7.11 + CentOs 5.11 + Django 1.8 + mod_wsgi 3.5

  

显示内部服务器错误   和来自错误日志的导入错误

wsgi.py

import os
import sys
sys.path = ['/var/www/firstweb'] + sys.path
os.environ['DJANGO_SETTINGS_MODULE'] = 'firstweb.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wgsi.WSGIHandler()

0 个答案:

没有答案