繁体   English   中英

Django weasyPrint fontconfig错误

[英]Django weasyPrint fontconfig error

我有一个需要从中获取pdf文件的应用程序,因此我选择了weasyprint,但是在使用PIP安装后,我导入了import weasyprint但在终端OSError: ctype.util.find_library() did not manage to locate a library called fontconfig出现错误OSError: ctype.util.find_library() did not manage to locate a library called fontconfig

然后我尝试使用from weasyprint import HTML, CSS from weasyprint.fonts import FontConfiguration from weasyprint import HTML, CSS from weasyprint.fonts import FontConfiguration我仍然遇到相同的错误。 在不编写任何其他代码的情况下,import语句将卡在错误上。 截至十月,我正在运行django和weasyprint。 提前致谢

python -m pip install weasyprint,重新python -m pip install weasyprint,但首先运行

brew install python3 cairo pango gdk-pixbuf libffi 

在Mac OS X上

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM