Python lxml not available in dev_appserver (gae, windows)

I also installed lxml.

It works great in IDLE.

But when I start the base application described below with dev_appserver.py, the server returns an error "There is no module named lxml".

import webapp2,lxml

class MainPage(webapp2.RequestHandler):
    def get(self):
        self.response.out.write("test")
app = webapp2.WSGIApplication([("/(.*)", MainPage)],debug=True)

How can I solve this problem?

Thank!!

+3
source share
2 answers

Presumably you are using the Python 2.7 runtime. This runtime provides an excellent way to set up libraries.

Please add the libraries section to your app.yaml as follows:

libraries:
- name: lxml
  version: latest

For more information see: https://developers.google.com/appengine/docs/python/python27/using27#Configuring_Libraries

+4
source

python, , - , App Engine . lxml .

-, , lxml , C, python App Engine.

0

All Articles