views:

1171

answers:

3

I get the error in question when I attempt to create a project. I followed the instructions found at how to install python an django in windows vista.

+1  A: 

Most likely you don't have Django on your Python path. To test, quickly fire up Python and run:

>>> import django

If that fails, it's just a matter of getting Django onto your Python path. Either you set the environment variable, or you move django into your python2x/Lib/site-packages directory. If it does work, try importing core. If that fails there, then something is probably wrong with your Django install.

tghw
I tried the following:>>> import django>>> import django.coreboth worked, but I still can't run:django-admin.py startproject my_django_projectI still get the error. Any other ideas?
mkelley33
Thanks for the help, but I resolved it below.
mkelley33
+3  A: 

Also make sure that you have permission to access all of django's files. I've seen these kinds of errors happen because of permissions issues before.

EDIT: I haven't tried it out, but there's a link on that page to Instant Django, which looks like a pretty easy to set up.

Jason Baker
Word! That Instant Django worked like a charm. I usually shy away from tools that set a bunch of configurations I might need to know how to troubleshoot, but this Instant Django looked clean and professional, and I was about to pull my hair out lol. Thanks so much!
mkelley33
A: 

You can get around this problem by providing the full path to your django-admin.py file

python c:\python25\scripts\django-admin.py startproject mysite
Niyaz