gpt4 book ai didi

google-app-engine - GAE dev_appserver "No module named lxml"

转载 作者:太空宇宙 更新时间:2023-11-03 15:32:08 25 4
gpt4 key购买 nike

我在 dev_appserver 中似乎无法使用 lxml。我有测试项目是用 windows python sdk 1.6.6 构建的 import lxml 行。 “没有名为 lxml 的模块”。我假设安装了 python 版本,但我有 Python 2.7。

import webapp2
import lxml

class MainHandler(webapp2.RequestHandler):
def get(self):
self.response.out.write('Hello world!')

app = webapp2.WSGIApplication([('/', MainHandler)],
debug=True)

===

application: teslxml
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico

- url: .*
script: main.app

libraries:
- name: webapp2
version: "2.5.1"
- name: lxml
version: latest

==

dev_appserver.py teslxml

最佳答案

更新:这不再是真的,lxml 现在开箱即用。 https://cloud.google.com/appengine/docs/standard/python/tools/built-in-libraries-27


lxml 不是开箱即用的 Google App Engine,您需要 install it .

关于google-app-engine - GAE dev_appserver "No module named lxml",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10744123/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com