classify icon indicating copy to clipboard operation
classify copied to clipboard

ModuleNotFoundError: No module named 'SimpleHTTPServer'

Open alanjds opened this issue 7 years ago • 10 comments

This is because I am running on Python3.

Maybe 2to3 fix it? Or is better to convert to Python3 manually and use python-future to keep compatible with Python2 ?

alanjds avatar Apr 03 '18 22:04 alanjds

@alanjds – I'm afraid the project doesn't support running under Python 3 currently. If you have the time to convert it to doing so I would really appreciate it, unfortunately I just don't have the time currently (particularly as this project has languished for years :( ).

Sorry I can't be of more help :(

ghickman avatar Apr 04 '18 10:04 ghickman

Thanks for the response.

I was kind of expecting it. Filled the issue just to "create backlog". Sometimes strangers do surprise you taking your issues and submitting PRs :)

The project is not needed for what I do right not, so I have no excuse to put effort on it today. Tomorrow can be different.

Thanks anyway.

alanjds avatar Apr 05 '18 18:04 alanjds

In Python 3: $ python -m http.server <portNo>

gwenau avatar May 09 '18 12:05 gwenau

thank you gwenau!

harrytrinh2 avatar Sep 01 '18 16:09 harrytrinh2

python3 -m http.server

the output is Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

Greetings from Universidad de Sonora Espacio educativo NTIC.

elgueromisa avatar Oct 11 '18 00:10 elgueromisa

Python 2.7 python -m SimpleHTTPServer 7777

Python 3

python -m http.server 7777

add port number if you want exemple up added i add port number 7777

testerfr810 avatar Jan 08 '19 15:01 testerfr810

Python 2

python -m SimpleHTTPServer 8000

or

py -m SimpleHTTPServer 8000

Python 3

python -m http.server 8000

or

py -m http.server 8000

Note

Replace 8000 with your ideal port number. Then in browser:

  1. ctrl+L

  2. type "localhost:8000"

justingolden21 avatar Apr 28 '20 00:04 justingolden21

In Python 3: $ python -m http.server

but i need to import it in file

SsNiPeR1 avatar Jul 01 '21 09:07 SsNiPeR1

@SsNiPeR1 – the python docs for http.server are the best place to read about this.

ghickman avatar Jul 01 '21 09:07 ghickman

I am also facing the same problem , but i got the solution which worker for me just type

python2 -m SimpleHTTPServer 80

xtx-69 avatar Jun 13 '24 18:06 xtx-69