pip install docx2html引发错误

时间:2018-06-19 16:05:08

标签: python-3.x

我正在尝试使用pip install docx2html在python库中安装docx2html,但显示了此回溯信息:

Collecting docx2html
  Using cached https://files.pythonhosted.org/packages/b3/a9/e943f7b36f1a8afd8b234b9e999be8837ab2666c7e743a4d527e14d39053/docx2html-0.2.3.tar.gz
Collecting lxml==2.2.4 (from docx2html)
  Using cached https://files.pythonhosted.org/packages/91/85/2776a729f8ef1e2aca83e02393dbdfcdf2c0f7c5a1205a77bbf1f82230f9/lxml-2.2.4.tar.gz
Collecting pillow==1.7.7 (from docx2html)
  Using cached https://files.pythonhosted.org/packages/77/93/d6eabe91dda55ac924c95763568d596e3e6082950a04c24fccf32c12324c/Pillow-1.7.7.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/_y/g09fpxn13xq7z6ptmq3095dm0000gn/T/pip-install-9u3p45p6/pillow/setup.py", line 162
        print "--- using Tcl/Tk libraries at", TCL_ROOT
                                            ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("--- using Tcl/Tk libraries at", TCL_ROOT)?

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/_y/g09fpxn13xq7z6ptmq3095dm0000gn/T/pip-install-9u3p45p6/pillow/

我尝试了pip install --upgrade setuptools,但是setuptools是最新的。

1 个答案:

答案 0 :(得分:0)

我通过使用pypandoc而不是docx2html将docx转换为html来解决了该问题。