I tried starting a new Django project yesterday but when I did “django-admin.py startproject projectname” I got an error stating: “django-admin.py is not recognized as an internal or external command.” The strange thing is, when I first installed Django, I made a few projects and everything worked fine. But now after going back a few months later it has suddenly stopped working.
I’ve tried looking around for an answer and all I could find is that this typically has to do with the system path settings, however, I know that I have the proper paths set up so I don’t understand what’s happening. Does anybody have any idea what’s going on?
First check the django was installed properly.
EDIT 1
If you got exception, try to uninstall and install django.
i recommend to do this by pip:
Then check the file
C:\Python26\Scripts\django-admin.pyexists.you may replace
c:\python26by your local python installation path.if you not found the file, so uninstall and install django, see EDIT 1 above.
then add
C:\Python26andC:\Python26\Scriptsto your path. see hereFrom python documents: