导入reportLab时出现cx-Freeze错误

时间:2015-06-01 11:54:00

标签: python-3.x cx-freeze reportlab

在我的python3.3代码中,我使用reportLab-3.1.44进行pdf生成..

from reportlab.lib.units import inch
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_JUSTIFY
from reportlab.lib.pagesizes import letter

我正在使用cx_Freeze 4.3.1并获取错误,如图像所示..但如果我删除reportLab它工作正常... 我应该如何在我的cx_freeze代码中处理reportLab ... 是否includes=['reportLab'] or import reportLab or include_files=['reportLab'] .... 有关它的任何建议

screenshot

因为我没有10个声誉,我的错误信息被上传到另一个链接......它不是恶意软件先生......

1 个答案:

答案 0 :(得分:0)

@ThomasK的所有功劳:将build_exe_options = {"packages": ["reportlab"]}添加到我的setup.py文件中是一种享受。

(注意我使用的是Python 3.5.2& cxfreeze 5.0)