【问题标题】:Running Python Code on XAMPP Localhost Server在 XAMPP 本地主机服务器上运行 Python 代码
【发布时间】:2019-10-21 00:21:38
【问题描述】:

我正在尝试在 XAMPP 上的 localhost 服务器上运行 python 应用程序。 该代码是一个非常基本的代码,以便查看我是否可以在 localhost 上运行它。 php 代码运行,但 python 代码返回错误。 错误信息将在下面显示。

我尝试了一个非常简单的有效的 php 代码和一个非常简单的 python 代码,但没有成功。 我在 XAMPP 文件中添加了 .py 和 index.html ,但它仍然不起作用。

我提到我使用的是 Python 3.7.3

我尝试运行 python 脚本时收到的错误消息:

服务器错误!

服务器遇到内部错误,无法完成您的请求。

错误信息:

无法创建子进程:720002: test.py

>     If you think this is a server error, please contact the webmaster.
>     Error 500
>     localhost
>     Apache/2.4.39 (Win64) OpenSSL/1.0.2r PHP/7.1.29

【问题讨论】:

  • XAMPP 是否通常开箱即用地处理 Python?可能是配置问题?没有更多细节很难说。
  • 我不认为它可以开箱即用地处理 Python,但是在 httpd.conf 文本文件中添加 .py 和 index.html 术语应该让 XAMPP 也可以管理 python。

标签: php python apache server xampp


【解决方案1】:

【讨论】:

    猜你喜欢
    • 2018-05-20
    • 2015-04-09
    • 2020-10-24
    • 2019-11-05
    • 1970-01-01
    • 1970-01-01
    • 2014-12-04
    • 1970-01-01
    • 2015-10-22
    相关资源
    最近更新 更多