I’ve installed WAMPServer (latest). Python 2.6 and Django 1.4 .
Everything looks to be good up until I start running my server. I get Internal Server Error. Apache error log shows the following:
[Sun Apr 08 16:11:27 2012] [error] [client ::1] mod_wsgi (pid=1040): Target WSGI script 'C:/wamp/www/testproject/django.wsgi' cannot be loaded as Python module.
[Sun Apr 08 16:11:27 2012] [error] [client ::1] mod_wsgi (pid=1040): Exception occurred processing WSGI script 'C:/wamp/www/testproject/django.wsgi'.
[Sun Apr 08 16:11:27 2012] [error] Traceback (most recent call last):
[Sun Apr 08 16:11:27 2012] [error] File "C:/wamp/www/testproject/django.wsgi", line 1, in <module>
[Sun Apr 08 16:11:27 2012] [error] import os, sys
[Sun Apr 08 16:11:27 2012] [error] ImportError: No module named os
I’ve got all my Environment variables and such set up. Using the Django provided server, it all works. I want to use Apache.
Your help is greatly appreciated.
This can occur when your Python/mod_wsgi installation has been done wrong. Key things to check are: