“python” not recognized as a command

后端 未结 12 1889
粉色の甜心
粉色の甜心 2020-11-22 14:01

I just downloaded and installed Python 2.7.2 to my laptop and I am trying to run some sample programs. My laptop is running Windows XP.

When I open a cmd

12条回答
  •  情话喂你
    2020-11-22 14:33

    This is because the Python exec are not in the search path of your operating system. In windows, start CMD. Type in

    setx PATH PythonPath

    where PythonPath is usually C:\Python27 or C:\Python33 or C:\Users\\AppData\Local\Programs\Python\Python37 depending on your Python version. After restarting the CMD, you should get see outcomes when typing

    Python --version
    

提交回复
热议问题