python3 weasyprint模块在windows下使用遇到错误
from weasyprint import HTML
HTML('https://weasyprint.org/').write_pdf('weasyprint-website.pdf')
报错
OSError: cannot load library 'gobject-2.0-0': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'
尝试过
1.安装gtk3和gtk2并将其bin文件夹放入环境变量
2.用os模块添加dll路径
3.使用pyhon3.6和python3.9分别尝试
有谁知道怎么做吗
这个错误通常是由于缺少gobject库导致的。您看看有没有安装gobject库。