Reputation: 5601
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.
Upvotes: 6
Views: 6508
Reputation: 33
From your command line (cmd
) run "ftype Python.File" and make sure that your .py files are being executed by the correct version/installation of Python.
It's possible another application has surreptitiously changed this under the hood.
Upvotes: 1
Reputation: 54793
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
Upvotes: 2
Reputation: 198667
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.
Upvotes: 3
Reputation: 25313
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.
Upvotes: 1