Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'SimpleHTTPServer' #16

Open
alanjds opened this issue Apr 3, 2018 · 10 comments
Open

ModuleNotFoundError: No module named 'SimpleHTTPServer' #16

alanjds opened this issue Apr 3, 2018 · 10 comments

Comments

@alanjds
Copy link

alanjds commented Apr 3, 2018

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 ?

@ghickman
Copy link
Owner

ghickman commented Apr 4, 2018

@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 :(

@alanjds
Copy link
Author

alanjds commented Apr 5, 2018

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.

@gwenau
Copy link

gwenau commented May 9, 2018

In Python 3:
$ python -m http.server

@harrytrinh2
Copy link

thank you gwenau!

@elgueromisa
Copy link

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.

@testerfr810
Copy link

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

@justingolden21
Copy link

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"

@SsNiPeR1
Copy link

SsNiPeR1 commented Jul 1, 2021

In Python 3:
$ python -m http.server

but i need to import it in file

@ghickman
Copy link
Owner

ghickman commented Jul 1, 2021

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

@xtx-69
Copy link

xtx-69 commented Jun 13, 2024

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

python2 -m SimpleHTTPServer 80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants