Python not working in command prompt?

前端 未结 20 1833
迷失自我
迷失自我 2020-11-27 15:25

I type python into the command line, but the command prompt says that python is not recognized as an internal or external command, operable program, or batch fi

相关标签:
20条回答
  • 2020-11-27 16:21

    I am probably the most novice user here, I have spent six hours just to run python in the command line in Windows 8. Once I installed the 64-bit version, then I uninstalled it and replaced it with 32-bit version. Then, I tried most suggestions here, especially by defining path in the system variables, but still it didn't work.

    Then I realised when I typed in the command line: echo %path%

    The path still was not directed to C:\python27. So I simply restarted the computer, and now it works.

    0 讨论(0)
  • 2020-11-27 16:23

    When you add the python directory to the path (Computer > Properties > Advanced System Settings > Advanced > Environmental Variables > System Variables > Path > Edit), remember to add a semicolon, then make sure that you are adding the precise directory where the file "python.exe" is stored (e.g. C:\Python\Python27 if that is where "python.exe" is stored). Then restart the command prompt.

    0 讨论(0)
提交回复
热议问题