简体   繁体   中英

Setting up a server with Python

I'm trying to use this commmand:

python -m SimpleHTTPServer 

but it's not working. I'm guessing that it isn't working because I'm running that through Windows Command Prompt. How does one make that function?

The error I am getting from Command Prompt is: "'python' is not recognized as an internal or external command, operable program or batch file"

i think You need to add that folder to your Windows Path this link can be useful :

https://docs.python.org/2/faq/windows.html

bluebird7 is right. You need to add python to your windows path. You can try this temporary alternative, type in cmd:

c:\python27\python.exe -m SimpleHTTPServer

The upper command will only work for python 2.7 and python needs to be installed here: c:\\python27

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM