Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GAE dev_appserver "No module named lxml"

It seems lxml is not available for me in dev_appserver. I have test project is import lxml line built with windows python sdk 1.6.6. "No module named lxml". I assume something with installed version of python, but I have 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
like image 724
Vasya Avatar asked Jun 14 '26 14:06

Vasya


1 Answers

Update: This isn't true anymore, lxml is now shipped out of the box. https://cloud.google.com/appengine/docs/standard/python/tools/built-in-libraries-27


lxml doesn't come out of the box with Google App Engine, you need to install it.

like image 67
Shay Erlichmen Avatar answered Jun 17 '26 21:06

Shay Erlichmen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!