小编Chr*_*HER的帖子

导入错误:无法导入站点模块及其依赖项:没有名为站点的模块

我正在尝试在 Windows 上运行 jython servlet。我什至无法运行最简单的 HelloWorld.py。我收到以下 500 错误:

message Servlet.init() for servlet [PyServlet] threw exception
 ...
description Le serveur a rencontré une erreur interne qui l''a empêché de satisfaire la requête.
exception
javax.servlet.ServletException: Servlet.init() for servlet [PyServlet] threw exception
 ...
cause mère
ImportError: Cannot import site module and its dependencies: No module named site
Determine if the following attributes are correct:
  * sys.path: ['C:\\apache-tomcat-8.5.24\\webapps\\jython\\WEB-INF\\lib\\Lib', '__classpath__', '__pyclasspath__/']
    This attribute might be including the wrong directories, such as from CPython
  * sys.prefix: …
Run Code Online (Sandbox Code Playgroud)

python windows servlets jython importerror

4
推荐指数
2
解决办法
7058
查看次数

标签 统计

importerror ×1

jython ×1

python ×1

servlets ×1

windows ×1