Question

When I try to start a new Django project by typing "django-admin.py startproject my_site" I am getting the following error: "'django-admin.py' is not a recognized as an internal or external command, operable program or batch file"

I am looking for help determining the correct path environment variable for Django on windows 7.

I have python correctly setup/installed. And I really thought Django was installed, presumably based on the command window output, it churned out considerable text, and the folder structure looks correct when I ran the install file.

I am convinced the problem is that my path variables aren't set up correctly. I can only seem to find advice online to add in the Python 2.7 path variable, which I already know works.

The current location of my Django folders is: C:\django And the current location of my Python 2.7 is: C:\Python27 Inside the python/scripts, there are django-admin files, so I swear, I'm not crazy.

Do I need to be inside the Django folder to make this work?

Thank you for any input you can offer.

Was it helpful?

Solution

You need to add C:\Python27\Scripts to your PATH environment variable. You should also check this post about making .py files run in windows.

OTHER TIPS

As per Django documentation, you need to have C:\Python27\Scripts in your path.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top