> If your python interpreter can't import django, you installed it > wrong. > C'est tres facil.
One of the previous post in this thread mentions the development server works fine, so django can be imported from the shell apparently. But testing that will never hurt; there may happen to be a django installation in the project directory as well, that would mess up things. > the django module should be installed to the system and should be > importable from anywhere. Setting your PYTHON_PATH is, at best, a > hack, and at worst, will cause massive problems (as hacks do) when > any little unrelated thing changes. Unless you don't have root access (although that's not the case here). Setting PythonPath isn't a hack, it can be a very convenient way to keep a lot of stuff out of root access. But see below. > > are you sure you have django directory _IN_ > > > > /usr/lib/python2.4/site-packages/django > > Yes, I have the django directory > > > > or is it only > > > > /usr/lib/python2.4/site-packages/django/core/handlers/modpython.py > -- > I have that file too > > > > then you would need only > > > > /usr/lib/python2.4/site-packages > > > > in the path ? > > > > -- tony > -- > I tried with > PythonPath "['/usr/lib/python2.4/site-packages/django'] + > sys.path" > > and > > PythonPath "['/usr/lib/python2.4/site-packages/'] + > sys.path" > > And I obtain the same error: > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Mod_python error: "PythonHandler django.core.handlers.modpython" > > Traceback (most recent call last): > > File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line > 287, in HandlerDispatch > log=debug) > > File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line > 461, in import_module > f, p, d = imp.find_module(parts[i], path) > > ImportError: No module named django > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You shouldn't need to add '/usr/lib/python2.4/site-packages/' to PythonPath: django is already in site-packages, and python (assuming that's python2.4 in /usr/bin) will automatically search there. You should, however, add the path to the 'ripsol' project there (or actually the path just above that); otherwise Python cannot pick up the ripsol.settings file (or any of your python files within ripsol). And I guess it should find something to test your setup when accessing the URL. As in the second code-part at http://www.djangoproject.com/documentation/modpython/#basic-configuration I'm not sure if that helps your problem, but problems (and solutions) occur in strange ways. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---