【问题标题】:Python cgi server module not found [duplicate]找不到 Python cgi 服务器模块 [重复]
【发布时间】:2016-08-24 18:13:01
【问题描述】:

当我在 cmd 中运行 python -m SimpleHTTPServer 8000python -m CGIHTTPServer 8000 时,我收到此错误:

没有名为 SimpleHTTPServer 的模块

没有名为 CGIHTTPServer 的模块

有谁知道为什么会发生这种情况或测试 python cgi-scripts 的另一种方法吗?

【问题讨论】:

    标签: python python-3.x cgi


    【解决方案1】:

    这不是从命令行启动它们的方式。

    the docs:基本的HTTP服务器启动

    python -m http.server 8000
    

    CGI 服务器与

    python -m http.server --cgi 8000
    

    【讨论】:

      【解决方案2】:

      来自this 答案:

      python -m http.server [<portNo>]
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-05-10
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-03-19
        • 1970-01-01
        • 2020-10-04
        相关资源
        最近更新 更多