2016-05-30 39 views
0

我想在Windows XP上設置Python SimpleHTTPServer。我的電腦上安裝了Python。我執行以下命令:在窗口上創建http服務器時出錯

python -m SimpleHTTPServer 8888 

但我得到的錯誤:

python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

+0

您可能需要到Python添加到Windows PATH環境變量。如果從包含python.exe的目錄運行相同的命令,它是否工作? – 101

回答

0

看起來像Python是不是在你的PATH環境變量。爲了解決這個問題嘗試這樣的回答: https://stackoverflow.com/a/6318188/6400392

  1. Hold Win and press Pause.
  2. Click Advanced System Settings.
  3. Click Environment Variables.
  4. Append ;C:\python27 to the Path variable.
  5. Restart Command Prompt.
相關問題