Add "django-admin.py" path to command line on Windows 7

43,207

Try following command.

set path=%path%;c:\python27\scripts

PATH is set only for the cmd.exe in which you run the above command.

UPDATE

To permanently set PATH:

  1. Right click My computer in the desktop.
  2. Click Advanced System Settings on the left.
  3. Click Environmental Variable.
  4. Add or Update PATH variable:
    • If it does not exist, create one, and set value as C:\python27\scripts
    • If it exist, append ;C:\Python27\scripts to existing value.
  5. Restart cmd.exe. (PATH will not change for already launched cmd.exe)
Share:
43,207
Michael
Author by

Michael

Updated on July 14, 2022

Comments

  • Michael
    Michael almost 2 years

    I've been trying to add the django-admin.py path to command line on Windows 7.

    I have tried to do it this way:

    C:\>set django-admin.py = C:\Python27\Scripts\django-admin.py
    

    But cmd told me that:

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

    So how can I add django-admin.py path to command line on Windows 7?

    I need it because later I'm doing this:

      C:\Users\Michael\Desktop\mysite>django-admin.py startproject mysite
    

    Thanks.

  • falsetru
    falsetru almost 11 years
    @MichaelVayvala, I added another way. Check it out.