bbartling
bbartling

Reputation: 3494

Python django-admin startproject mysite

First timer here with Django and I am running into some issues trying to start the site with the Windows command prompt django-admin startproject mysite

My pip install worked as I can import the module and check the Django version. I am also running Python version 3.6...

>>> import django 
>>> print(django.get_version()) 
2.0.4

I also created a directory on my windows machine so my windows command prompt looks like this:

C:\Users\b\Documents\Python\Django>django-admin startproject mysite

But I am getting an error 'django-admin' is not a recognized as an internal or external command, operable program or batch file.'

Any tips to try??? Thanks

Upvotes: 1

Views: 1517

Answers (2)

bbartling
bbartling

Reputation: 3494

Add in the PATH for Django-admin

Open: Control Panel -> System -> Advanced -> Environment Variables -> PATH.

enter image description here

Click new as shown above and then find in your Windows machine where the django-admin files live in the hidden directory for the Python SCRIPTS.

On my machine its here: C:\Users\AppData\Local\Programs\Python\Python36-32\Scripts

Enter in PATH and your directory as shown below, then viola it should work enter image description here

Upvotes: 1

Ralf
Ralf

Reputation: 16485

It looks like your django command utility is not registered in your systems path (the environment variable PATH in your windows system).

Have you looked into this post ? There are some pointers to get your machine up and running.

Upvotes: 0

Related Questions