ERROR: reportlab.lib.pagesizes
SainteCelery opened this issue · comments
Traceback (most recent call last): File "xxxxxx/Scripts/text2pdf.py", line 5, in <module> import reportlab.lib.pagesizes ImportError: No module named reportlab.lib.pagesizes
Did you install the reportlab module before trying to use the program?
I get exactly this message when I use Debian's python3-reportlab but not the python-reportlab package. In both cases the files /usr/lib/python2.7/dist-packages/reportlab/lib/pagesizes.py and /usr/lib/python3/dist-packages/reportlab/lib/pagesizes.py exist. A Debian bug?
--
Brian.
My system has an ample supply of Python 3 modules already installed, including Reportlab. I did not want to bother installing the Python 2 version of Reportlab.
Since txt2pdf
will run under Python 3, I changed the first line of txt2pdf.py
to
#! /usr/bin/env python3
That solved the problem for me.
There is the idea of a dependencies.txt
file that could be leveraged here so people installing txt2pdf
don't bump into this sort of dependency problem.