Reputation: 21
I am new to python. I created this file using following command:
C:\Python35\Scripts\django-admin startproject mysite
After that successfully created a file in directory.But when i run C:\Python35\Scripts\mysite\python manage.py migrate or C:\Python35\Scripts\mysite\python manage.py runserver, i am getting the following error
python is not recognized as an internal or external command operable program or batch file
how to solve this problem?
Upvotes: 0
Views: 1324
Reputation: 3178
You appear to be mixing up paths.
Generally, if you type python
, the system looks up your pythonpath
, and resolves it to the python executable. On the windows systems I've used, that tends to be at c:\python35\python.exe
However, in this instance, you've given it a full path, but not actually pointed it to the executable.
I believe (assuming your path is correct) that this version should work:
C:\Python35\Scripts\mysite\python.exe manage.py migrate
.
That said, on my windows machines, I can just do
manage.py migrate
, because the python.exe is set by pythonpath when Python3.5 was installed.
Tl;dr:
Run manage.py migrate
or use a full path to the executable.
Upvotes: 1