how to use reportlab with google app engine

十年热恋 提交于 2019-12-06 11:31:05

If you just unzip the reportlab zip in your root directory of your application, then it won't work, as the reportlab zip is intended for a local setup using setup.py, which you don't use in appengine.

You should look inside the zip to the src directory and inside that is a reportlab directory - in my case the zip file contents will be reportlab-3.0/src/reportlab copy/move this reportlab directory to the root level of your application.

You should probably also read up on how import and modules work oin python. If you where familiar with this you could work it out for yourself looking at the structure of the zip contents.

ALso pay attention to the prerequesites if you want to work with images. If you do you will need to install PIL locally, and enable it in app.yaml however you don't deploy the PIL code. You can read more about this in the appengine 3rd part libraries docs.

Checking the destination path of reportlab installation after the command pip install reportlab and then make a link to reportlab at the root of the python project ln -s /usr/lib/python2.7/dist-packages/reportlab

You need to move to the lib's parent directory. Then you can install reportlab using this command:

pip install -t lib reportlab
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!