【发布时间】:2017-11-30 02:03:57
【问题描述】:
我已尝试安装 xhtml2pdf 以从 html 渲染 pdf。我已按照以下说明进行操作。
Installation
For python2.7:
pip install xhtml2pdf
To obtain the latest experimental version that has Python 3 support, please use a prerelease:
pip install --pre xhtml2pdf
但是在这个过程中,C9 向我显示了这个错误。我该如何解决这个问题?
谢谢
【问题讨论】:
-
您正试图以某种方式使用 python 3 安装它。可以看到有一行引用
File "/usr/lib/python3.4/importlib/__init__.py" -
但是当我使用 --pre 时它会显示这个错误
File "/usr/local/lib/python2.7/dist-packages/xhtml2pdf/util.py", line 302 raise Exception, "box not defined right way"
标签: python django xhtml2pdf c9.io