0

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?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.