2013-06-27 9 views
132

Desidero configurare Python SimpleHTTPServer su Windows XP. Ho installato Python sul mio computer. Sto eseguendo il comando seguente:Configurare Python simpleHTTPserver su Windows

python -m SimpleHTTPServer 8888 

Ma sto ottenendo l'errore:

C:\Python33\python.exe: No module named SimpleHTTPServer 

È SimpleHTTPServer per Python disponibile su Windows? Se sì, cosa devo fare per configurare il server?

+4

Il modulo si chiama 'SimpleHTTerver', con una S maiuscola sul server. – BrenBarn

+1

stesso risultato con capitale S anche – codeofnode

risposta

319

Da Stack Overflow questione What is the Python 3 equivalent of "python -m SimpleHTTPServer":

le seguenti opere per me:

python -m http.server [<portNo>] 

perché sto usando Python 3 modulo SimpleHTTPServer è stato sostituito da http.server, almeno in Windows .

+3

Grazie mille, questo è stato davvero utile. Con python33 il comando 'python -m http.server 7777' funziona perfettamente. – rahoolm

+1

Windows 7, usando Anaconda python, funzionava alla grande; $ python -m SimpleHTTPServer 7070 – AnneTheAgile

+0

Posso confermare $ python -m SimpleHTTerver funziona con Windows 7 Python installato con cygwin – MacK

Problemi correlati