If I run python manage.py runserver, it works fine. But when I try to have my site run through apache, I keep getting the error:
mod_wsgi (pid=25005): Exception occurred processing WSGI script '/apps/peer-web/peer_web/wsgi.py'.
Traceback (most recent call last):
File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 236, in __call__
self.load_middleware()
File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/base.py", line 53, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware django.contrib.auth.middleware: "datetime initialization failed"
mod_wsgi (pid=25005): Exception occurred processing WSGI script '/apps/peer-web/peer_web/wsgi.py'.
Traceback (most recent call last):
File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 236, in __call__
self.load_middleware()
File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/base.py", line 53, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware django.contrib.auth.middleware: "cannot import name utils"
EDIT: new traceback after re-installing Django
mod_wsgi (pid=25005): Exception occurred processing WSGI script '/apps/peer-web/peer_web/wsgi.py'.
Traceback (most recent call last):
File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 236, in __call__
self.load_middleware()
File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/base.py", line 53, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware django.contrib.auth.middleware: "cannot import name utils"
mod_wsgi (pid=25005): Exception occurred processing WSGI script '/apps/peer-web/peer_web/wsgi.py'.
Traceback (most recent call last):
File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 236, in __call__
self.load_middleware()
File "/apps/peer-web-env/lib/python2.7/site-packages/django/core/handlers/base.py", line 53, in load_middleware
raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware django.contrib.auth.middleware: "cannot import name utils"
How do I fix this?