tags:

views:

30

answers:

2

I am trying to setup django with fastcgi on apache. Django is installed and seems to be running correctly but I am having problems with setting up fastcgi.

I decided to test out my dispatch.fcgi script in the interactive python shell line by line and the following line:

from django.core.servers.fastcgi import runfastcgi

results in the following error:

ImportError: No module named core.servers.fastcgi

I can import django with no problem but import django.core gives yet another ImportError (No module named core).

How can I go about ensuring that I can import django.core. If I can import django then in must be on my path, and so why can I not import core?

A: 

Probably you have django.py module in your working directory or in any other that is in python path.

Alex Koshelev
A: 

You probably have a file/folder called django somewhere in your path, that isn't the actual path.

try this

import sys
sys.path

And then check everything in that output to see if there is a file/folder called django(.py) somewhere.

If so, change the path (sys.path = ['/path/to/directory/below/django/install'] + sys.path) or move/rename the file.

Mez