1
resposta

/usr/bin/python: No module named SimpleHTTPServer

Ao executar o comando no Cloud Shell, recebi a seguinte mensagem de erro:

root@cs-901715686719-default:/home/gma2386# python -m SimpleHTTPServer 8000
********************************************************************************
Cloud Shell now defaults to Python 3.
Python 2 can still be found at '/usr/bin/python2.7' and used with the 'python2.7' command.

To suppress this warning, create an empty ~/.cloudshell/python3-default-message file.
********************************************************************************
**/usr/bin/python: No module named SimpleHTTPServer**

Pesquisando na internet, descobri que para o Python 3, o comando correto a ser executado é o: python3 -m http.server 8000

root@cs-901715686719-default:/home/gma2386# python3 -m http.server 8000
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...
127.0.0.1 - - [08/Jun/2022 14:51:05] "GET /?authuser=0&redirectedPreviously=true HTTP/1.1" 200 -
127.0.0.1 - - [08/Jun/2022 14:51:05] code 404, message File not found
127.0.0.1 - - [08/Jun/2022 14:51:05] "GET /favicon.ico HTTP/1.1" 404 -
1 resposta

Olá, Gabriel. Tudo bem?

Obrigado por compartilhar a solução!

Bons estudos!