Amit
Amit

Reputation: 215

Import django doesn't work? Pythonpath?

I'm running Windows with Python 2.7 and (I believe) Django 1.0. I installed Django using the Bitnami Djangostack. The strange thing is, when I typed "import django" in python, I got this error:

Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
ImportError: No module named django

I searched online for an answer, but all of the answers I found were "django needs to be in your PYTHONPATH." I'm new to Python, so I don't know what this means. Can someone please explain this to me?

Upvotes: 1

Views: 2274

Answers (2)

Ken Cochrane
Ken Cochrane

Reputation: 77415

if you type the following at the command line what does it say?

python --version

My guess is that bitnami installed into one python version and you are using another, or when they installed it they didn't put it in the pythonpath. I don't know much about the bitnami stack but have you looked at these instructions?

https://docs.djangoproject.com/en/1.3/topics/install/

Upvotes: 0

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799300

It means that you need to install Django under Python 2.7 as well.

Upvotes: 3

Related Questions