[Answered ]-Django-admin.py startproject mysite not working python 2.7

1👍

I think your system is not finding the file django-admin.py. Use cmd and navigate to the directory that contains this file and try to execute the command from there:

python django-admin.py startproject mysite

If it works, I recommend you to create an environment variable (e.g. DJANGO_ADMIN) to point do django-admin.py so you can execute the command below from anywhere:

python %DJANGO_ADMIN% startproject mysite 

EDIT:

Creating an environment variable on Windows XP:

  1. Open System in Control Panel.

  2. On the Advanced tab, click Environment Variables, then click the name of the user variable or system variable you want to change, as follows. Click ‘New’ to add a new variable name and value.

Creating an environment variable on Windows 7:

  1. Open the Start Menu and right click on Computer. Select Properties.
  2. Select Advanced system settings.
  3. In the Advanced tab, select Environment Variables.
  4. Select ‘New’.

Creating an environment variable on Windows 8:

Start -> All Apps -> Control panel -> System -> Advanced System Settings -> Advanced -> Environment variables.

1👍

You can Follow @AmauryMedeiros answer or you can set a path to system environment variable to C:\Python27\Scripts.

It works…

Leave a comment