classify
classify copied to clipboard
ModuleNotFoundError: No module named 'SimpleHTTPServer'
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 – 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 :(
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.
In Python 3: $ python -m http.server <portNo>
thank you gwenau!
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.
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
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:
-
ctrl+L
-
type "localhost:8000"
In Python 3: $ python -m http.server
but i need to import it in file
@SsNiPeR1 – the python docs for http.server are the best place to read about this.
I am also facing the same problem , but i got the solution which worker for me just type
python2 -m SimpleHTTPServer 80