Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Download PDF generates Import Error: Reportlab Version 2.1+ is needed! #174
I'm a Django noob, and I'm generally out of my league when it comes to dependency issues. Thanks in advance for your help!
When I try to generate a PDF of the invoice, I receive this error:
"Reportlab Version 2.1+ is needed!"
I have Reportlab 3.0 installed.
I'm working in a clean virtualenv. This is my pip freeze:
Thanks. As suggested, I was able to find the help I needed on the "xhtml2pdf" googlegroup mailing list.
FYI: I went into ./lib/python2.7/site-packages/sx/pisa3/pisa_util.py to implement this solution:
"The problem is with the installation.
if not (reportlab.Version == "2" and reportlab.Version >= "1"):
This will fail as the reportlab version is now 3.0.
Just replace this code segment with the following:
if not (reportlab.Version[:3]>="2.1"):
raise ImportError("Reportlab Version 2.1+ is needed!")
REPORTLAB22 = (reportlab.Version[:3]>="2.1")
Option 1 :
Remove below in your requirements.txt file
I am using python 2.7
git+https://github.com/rajanmandanka/pisa.git#egg=pisa not found anymore