ImportError: cannot import name PyFontify
ImportError: cannot import name PyFontify
我正在使用 pip
安装 django-easy-pdf
、xhtml2pdf
和 reportlab
我在虚拟环境中安装了以下内容。:
$ pip install django-easy-pdf
$ pip install "xhtml2pdf>=0.0.6" "reportlab>=2.7,<3"
但是在测试之后,有一个导入错误,包含以下信息:
from reportlab.lib import PyFontify
ImportError: cannot import name PyFontify
哦,我差点忘了,当我安装 reportlab
时,在安装过程中出现了这个:
running build_ext
building '_rl_accel' extension
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
Get it from http://aka.ms/vcpython27
----------------------------------------
Rolling back uninstall of reportlab
我通过删除软件包及其依赖项并重新安装来解决这个问题。
我正在使用 pip
安装 django-easy-pdf
、xhtml2pdf
和 reportlab
我在虚拟环境中安装了以下内容。:
$ pip install django-easy-pdf
$ pip install "xhtml2pdf>=0.0.6" "reportlab>=2.7,<3"
但是在测试之后,有一个导入错误,包含以下信息:
from reportlab.lib import PyFontify
ImportError: cannot import name PyFontify
哦,我差点忘了,当我安装 reportlab
时,在安装过程中出现了这个:
running build_ext
building '_rl_accel' extension
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
Get it from http://aka.ms/vcpython27
----------------------------------------
Rolling back uninstall of reportlab
我通过删除软件包及其依赖项并重新安装来解决这个问题。