how to create a Django project without using an IDE, but using the django-admin startproject command

39 views
Skip to first unread message

Ando Rakotomanana

unread,
Mar 9, 2019, 1:15:01 PM3/9/19
to Django users
Hello, I'm still starting with django. And I have a problem with the creation of the project, I write: "django-admin startproject DjangoTest" in the cmd of my windows and it tells me that django-admin is not an internal command. While I typed the same code this morning in the cmd and it worked. And I do not understand why?
I have python 2.7.0 and 3.7.2 and django 1.6.2 installed on my windows 8.1

Cathbert Mutaurwa

unread,
Mar 9, 2019, 1:23:22 PM3/9/19
to django...@googlegroups.com
Try check if django is setup properly in environment variables.


Maybe that will help

On Sat, 09 Mar 2019, 20:14 Ando Rakotomanana, <andorako...@gmail.com> wrote:
Hello, I'm still starting with django. And I have a problem with the creation of the project, I write: "django-admin startproject DjangoTest" in the cmd of my windows and it tells me that django-admin is not an internal command. While I typed the same code this morning in the cmd and it worked. And I do not understand why?
I have python 2.7.0 and 3.7.2 and django 1.6.2 installed on my windows 8.1

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8bc18725-3935-4740-9b08-4964b686ddf1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rammanoj Potla

unread,
Mar 9, 2019, 2:07:09 PM3/9/19
to django...@googlegroups.com
Are you in the virtual environment ?? I guess you might be trying from outside the virtual environment

abel otugeme

unread,
Mar 10, 2019, 3:38:13 AM3/10/19
to django...@googlegroups.com

Make sure your virtual environments are set up well.  Also make sure your running that command from the folder where your manage.py file is...

On Mar 9, 2019 7:12 PM, "Ando Rakotomanana" <andorako...@gmail.com> wrote:
>
> Hello, I'm still starting with django. And I have a problem with the creation of the project, I write: "django-admin startproject DjangoTest" in the cmd of my windows and it tells me that django-admin is not an internal command. While I typed the same code this morning in the cmd and it worked. And I do not understand why?
> I have python 2.7.0 and 3.7.2 and django 1.6.2 installed on my windows 8.1
>

Ando Rakotomanana

unread,
Mar 10, 2019, 7:08:41 AM3/10/19
to Django users
ok, i will try to reconfigure the virtual environment

Sam Taiwo

unread,
Mar 10, 2019, 7:19:41 AM3/10/19
to django...@googlegroups.com
Make sure your virtual environment is activated, you have to activate it each time you create a new terminal.

Also contrary to what someone else said, you can use django-admin anywhere, while you must be in the correct directory to run the manage.py file

nm

unread,
Mar 10, 2019, 11:05:59 AM3/10/19
to Django users
As others have pointed out, the problem might be not having your virtual env activated.
If it's your first time with Django, there are very clear installation and set-up instructions in the Django Girls tutorial - also for Windows. I highly recommend it for a start.

On a side note, I'd also recommend using Python 3.x and Django 2.1, if you can. Django 1.6 has not been supported for 4 years now, and Python 2.7 support is going to be dropped soon... and I suppose Django 1.6 may not be compatible with Python 3.7 ;)

Carlos Eduardo

unread,
Mar 11, 2019, 10:03:20 AM3/11/19
to Django users
Another tip is using templates to create your project. I'm developing one but the first version is already published. I added the template on GitHub with a good how-to.

Reply all
Reply to author
Forward
0 new messages