Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django-admin.py startproject mysite command not working

I am trying to create very first project using django but stuck at very first step itself. Whenever I give django-admin.py startproject mysite command not working command, nothing happens and help related information comes up on command prompt. I have set PYTHON_HOME, PATH variables set correctly. I am using python 2.7.

My command prompt looks as follows :

C:\Shekhar\djangoWorld>c:\Python27\Scripts\django-admin.py startproject mysite
Usage: django-admin.py subcommand [options] [args]

Options:
  -v VERBOSITY, --verbosity=VERBOSITY
                        Verbosity level; 0=minimal output, 1=normal output,
                        2=verbose output, 3=very verbose output
  --settings=SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath=PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Print traceback on exception
  --version             show program's version number and exit
  -h, --help            show this help message and exit

Type 'django-admin.py help <subcommand>' for help on a specific subcommand.

Available subcommands:

[django]
    cleanup
    compilemessages
    createcachetable
    dbshell
    diffsettings
    dumpdata
    flush
    inspectdb
    loaddata
    makemessages
    reset
    runfcgi

Why django is not creating project for me?

Please help !!

like image 404
Shekhar Avatar asked Mar 14 '26 16:03

Shekhar


2 Answers

Add 'python' before django-admin.py (or add full path to python.exe).

C:\Shekhar\djangoWorld>python c:\Python27\Scripts\django-admin.py startproject mysite

like image 84
stalk Avatar answered Mar 17 '26 06:03

stalk


Your Django installation is broken. Reinstall.

like image 21
Ignacio Vazquez-Abrams Avatar answered Mar 17 '26 06:03

Ignacio Vazquez-Abrams



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!