-1

I'm trying to start the serve with this command, but I had this error python is not recognized as an internal or external command

I know that I need to change the Path. But I tried and didn't get the solution for this.

my current path: C:\Program Files\Python2.7\Lib\site-packages\Django-1.8-py2.7.egg\django\bin\mysite

What do I need to change in the Path?

Charles
  • 50,943
  • 13
  • 104
  • 142
imtk
  • 1,510
  • 4
  • 18
  • 31
  • 2
    [How do I run a Python program under Windows?](https://docs.python.org/2/faq/windows.html#how-do-i-run-a-python-program-under-windows) – Ashwini Chaudhary May 04 '14 at 22:08

2 Answers2

0

You have to add the path to the python.exe binary, not your django website.

Vadim Shender
  • 6,703
  • 1
  • 16
  • 10
0

You need to add the directory containing the python executable to your PATH environment. Further info is at the end of the first question in this link https://docs.python.org/2/faq/windows.html

ojs
  • 492
  • 4
  • 13
  • yeah, i did that (C:\Program Files\Python2.7), but also didn't get the solution for that. – imtk May 04 '14 at 22:55
  • The error message you get indicates that windows does not recognise python to be a command which means that you do not have the PATH environment variable set up correctly. Try to open a cmd window and type in python, see if you go to the python command prompt. If not then find out how to edit your PATH environment variable and add c:\Program Files\Python2.7 to it – ojs May 05 '14 at 00:35
  • Do you mean that you tried opening a command window, type in python and you got "'python' is not recognized as an internal or external command, operable program or batch file."? Then follow the advice in the first answere here (which is what we have been telling you to do all along, but instead of C:\Python2.7 put C:\Program Files\Python2.7 since that is where your python executable seems to be, do NOT put C:\Program Files\Python2.7\Lib\site-packages\Django-1.8-py2.7.egg\django\bin\mysite in the PATH variable): http://stackoverflow.com/questions/7054424/python-not-recognised-as-a-command – ojs May 06 '14 at 21:33