问题
According to Google App Engine Third Party Libraries Support, the latest version of lxml supported is 2.3 https://cloud.google.com/appengine/docs/python/tools/libraries27
And python-pptx requires lxml >= 3.1.0 https://github.com/scanny/python-pptx/blob/master/requirements.txt
So what's the best way (if possible) to run python-pptx on GAE?
Note: I'm using buildout to deploy my applications, and that where those restrictions fail.
Thanks!
回答1:
App Engine isn't compatible with that library so your best bet if you still want to stick with App Engine services is to use Managed VMs: https://cloud.google.com/appengine/docs/managed-vms/
This will let you access all the App Engine services but give you more flexibility with installing libraries.
回答2:
I had the same problem. I wanted to use Python-pptx with GAE standard environment but wasn't able because GAE standard doesn't support Pillow. I migrated to GAE flexible environment and it works perfectly. Took a few hours to adjust my code for the flexible environment but its no big deal.
来源:https://stackoverflow.com/questions/29242092/python-pptx-on-google-app-engine