Troubleshooting “django-admin is not recognized”

When developing a Django application, one of the first steps is to run the django-admin startproject command from the terminal window.

In a Windows environment this can lead to the following error:

'django-admin' is not recognized as an internal or external command,

operable program or batch file.


To fix this, first close the terminal window and relaunch it with administrator privileges.

Once you launch the elevated terminal window change directory to where you wish to start your Django project. The command should work.


If this still doesn’t work, make sure to add the appropriate folders for your Python installation to the Path environment variables in Windows.

Posted in Uncategorized.