In the end the registry settings were in a different place, as although I am an admin on my machine, I did unattended installation without ALLUSERS=1
I should've known this, as I'd opened a bug about it, never sorted it as at the time it didn't break anything too badly for me: http://bugs.python.org/msg78058 ...."The registry keys do get set, though not in HKEY_LOCAL_MACHINE, but in HKEY_CURRENT_USER. To install quietly for all users, you need to add ALLUSERS=1; see" - I'm not sure if it should be able to look in HKEY_CURRENT_USER for the key as well, I guess apache runs as a different user so maybe this wouldn't work ? Hopefully this will help somebody in the future :) On Feb 9, 11:27 pm, Graham Dumpleton <[email protected]> wrote: > 2009/2/10 Stu.Axon <[email protected]>: > > > > > > > Hi, > > I just installed apache and mod_wsgi. > > > I can have a very simple handler, but when I try and import it says > > > File "C:/django/test/apache/django.wsgi", line 3, in <module> > > import os, sys > > ImportError: No module named os > > > I've looked around a bit, but haven't found any relevant info. > > > I can upload a copy of httpd.conf somewhere if it would help, my > > hander looks like this: > > > #!/usr/bin/python > > > import os, sys > > sys.stdout = sys.stderr > > > os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' > > > import django.core.handlers.wsgi > > > application = django.core.handlers.wsgi.WSGIHandler() > > > ## EOF > > > Cheers :) > > Write a command line Python script which imports 'os' module and tries > to do something. This looks a lot like the registry entries defining > where Python looks for modules has been screwed up or there aren't > any. > > This latter might happen for example if you install Python as yourself > rather than Administrator, meaning that user that Apache runs as > doesn't have access to registry configuration as it is against you > rather than the machine as a whole. > > If Python was installed as you, without Administrator privilege, > uninstall Python and reinstall as someone with Administrator > privilege. > > Another possibility is that you have multiple versions of Python > installed, with some being self contained versions as part of some > third party application. If the Python DLL from those application > bundled versions are being found in PATH before the correct one by > Apache, it can screw things up. > > Graham --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en -~----------~----~----~----~------~----~------~--~---
