【发布时间】:2011-09-30 11:28:14
【问题描述】:
我想在浏览器中运行 python 文件。
我已经安装了阿帕奇。并配置httd.conf 文件。
我创建了test.pyfile。
然后我尝试通过在浏览器中输入htt://localhost/test.py 来运行test.py。当我这样做时,我收到以下错误:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, lohith.pinto@primefocusworld.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
在我的错误日志中
[Thu Jul 07 18:39:55 2011] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't create child process: 720002: test.py
[Thu Jul 07 18:39:55 2011] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't spawn child process: C:/Program Files (x86)/Apache Software Foundation/Apache2.2/htdocs/test.py
这可能是什么问题?
【问题讨论】:
-
在浏览器上运行 Python 意味着你必须配置你的浏览器,而不是你的服务器。当您在浏览器中运行 Python 时,您的浏览器(FireFox、IE、Opera、Safari 等)正在运行 Python。这与 Apache 无关。你真正想做什么?
-
@S.Lott 以及如何配置浏览器?