Hint - you can't just copy a script around and expect it to work. The
script depends on other files to make it all happen.
If in python, you type,
import sys
sys.path
... and you see something like C:\first\Python26\Lib\site-packages, it
should work fine assuming Django was installed using setuptools or
pip. If not, you should look into using that instead of manually
installing it.
If you insist on doing it manually, you need to look into creating a
.pth file to add the packages into the PYTHONPATH.
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>
How did you install Django? In c:/first/Python26/Lib/site-packages, is
there a .pth file? If so, what is in it?
It sounds like you did not install Django properly - you just unpacked
it inside c:/first/Python26/Lib/site-packages. There's a bit more to
it. The best way to do it is to use the setup script provided with
Django (if you're doing this, do NOT unpack the archive inside
site-packages; the setup script will do the copying for you), or use
easy_install or pip (which you may have to install separately).
To use the provided setup script, simply unpack the Django tarball to
somewhere temporary. The open the command prompt at that location, and
type -
python setup.py install
And Python should do the rest. You should have a working Django setup
by the end.
Also, C:\first\Python26\Scripts should be in your Windows PATH, but
none of the other Python related paths. Python already knows about its
site-packages directory. And inside C:\first\Python26\Scripts, there
should be a file named django-admin.py once the above setup script has
finished.