garson
garson

Reputation: 1617

Running web server using Python errors

I am using this tutorial and specifically having trouble with the part that says:

"To run a Python web server: Open up a new terminal window. Via the command line, navigate into the directory that you want served. For example, if your project folder is in your Desktop folder on your Mac, you could type: cd ~/Desktop/project-folder. Enter python -m SimpleHTTPServer 8888 &. "

But when I try that, it says "python" is not recognized as an internal or external command. Is there something I need to be adding to a PATH variable or something?

Thanks!

Upvotes: 0

Views: 122

Answers (1)

Juuso Meriläinen
Juuso Meriläinen

Reputation: 611

It should work on Windows just the same, try

C:\Python27\python.exe -m SimpleHTTPServer 8888

If you want to be able to call it with simply python ..., see e.g. Adding Python Path on Windows 7 or Installing Python 2.7 on Windows 8 for adding Python to Windows PATH.

Upvotes: 1

Related Questions