[Solved]-Can't create django project using Windows command prompt

13👍

I don’t think Windows supports the shebang line. Try invoking it with python django-admin.py ...

6👍

I’m using python 2.7 , django 1.7 in windows7.

WAY-1:

1) Go to C:\Python27\Scripts (or your installation directory)

2) open cmd and enter python django-admin-script.py startproject ProjectName

3)Your project folder with all necessary files ll be created there.

The problem is in windows, django-admin.py is supplied as django-admin-script.py

WAY2:

1)Open cmd at any location you want.

2)enter django-admin startproject ProjectName

3)Your project folder with all necessary files ll be created there.

Its because the .exe file is supplied.

5👍

This often happens in Windows.

  1. Open cmd at any location you want.
  2. enter django-admin startproject ProjectName (don’t add the .py extension to the admin)
  3. Your project folder with all necessary files will be created there.

This is because the .exe file is supplied inside the directory.

3👍

For anyone else who has this issue:

Try taking out the ‘.py’

django-admin startproject helloworld
👤Jarrod

2👍

firstly find out where the django-admin.py is located then go to that path and then run the command django-admin.py startproject projectName
i hope it will help you……best luck

-2👍

Using the Bitnami Django Stack

> cd C:\Users\user_user_name\Bitnami Django Stack projects
C:\Users\user_user_name\Bitnami Django Stack projects>
> python C:\Bitnami\djangostack-1.8.17-0\apps\django\Django-1.8.17-py2.7.egg\EGG-INFO\scripts\django-admin.py --version
> python C:\Bitnami\djangostack-1.8.17-0\apps\django\Django-1.8.17-py2.7.egg\EGG-INFO\scripts\django-admin.py startproject projectname

That works for me.

👤manali

Leave a comment