Vas*_*sya 3 google-app-engine lxml python-2.7
似乎lxml在dev_appserver中不适用于我.我有测试项目是import lxml使用windows python sdk 1.6.6构建的."没有名为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)
Run Code Online (Sandbox Code Playgroud)
===
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
Run Code Online (Sandbox Code Playgroud)
==
dev_appserver.py teslxml
Run Code Online (Sandbox Code Playgroud)
更新:这不再是真的,lxml现在开箱即用. https://cloud.google.com/appengine/docs/standard/python/tools/built-in-libraries-27
lxml不是Google App Engine的开箱即用,您需要安装它.