Reputation: 3494
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
Reputation: 3494
Add in the PATH for Django-admin
Open: Control Panel -> System -> Advanced -> Environment Variables -> PATH.
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
Upvotes: 1