python - how to use reportlab with google app engine -
i unable import reportlab under google app engine. according following guide (and several other places on web):
"all have download , copy 'reportab' directory root directory of app. "
when (i download reportlab-3.0.zip here) , extract root directory of application, try import reportlab using following lines:
from reportlab.pdfgen import canvas reportlab.lib.pagesizes import a4
i import error
importerror: no module named reportlab.pdfgen
i tried googling no avail. on appreciated not sure else try. many thanks!
one other thing tried copying what's in src directory of downloaded zip under root directory of application didn't work either. error using is:
importerror: cannot re-init internal module __main__
seems version 2.7 imports okay, issues 3.0
if unzip reportlab zip in root directory of application, won't work, reportlab zip intended local setup using setup.py
, don't use in appengine.
you should inside zip src directory , inside reportlab directory - in case zip file contents reportlab-3.0/src/reportlab
copy/move reportlab
directory root level of application.
you should read on how import , modules work oin python. if familiar work out looking @ structure of zip contents.
also pay attention prerequesites if want work images. if need install pil locally, , enable in app.yaml don't deploy pil code. can read more in appengine 3rd part libraries docs.
Comments
Post a Comment