![](/img/trans.png)
[英]Django Weasyprint: Timeout error loading css while site is hosted on PythonAnywhere
[英]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.