0

I have tried to install xhtml2pdf for render pdf from html.I have followed the instructions bellow.

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

but in this process , C9 shows me this error. How can I solve this problem?

enter image description here

Thanks

Shaon shaonty
  • 1,367
  • 1
  • 11
  • 22
  • You're trying to install it with python 3 somehow. You can see that theres a line that references `File "/usr/lib/python3.4/importlib/__init__.py"` – wpercy Nov 29 '17 at 15:48
  • but when i use --pre it shows me this error `File "/usr/local/lib/python2.7/dist-packages/xhtml2pdf/util.py", line 302 raise Exception, "box not defined right way"` – Shaon shaonty Nov 29 '17 at 15:51

1 Answers1

1

This issue is solved by updating six package. I've uninstall the six package and again install the update one.

sudo pip install six

or

sudo pip install six -U
Shaon shaonty
  • 1,367
  • 1
  • 11
  • 22