mkdocs-with-pdf
mkdocs-with-pdf copied to clipboard
OSError: no library called "cairo" was found
enviroment: Windows10, Python3.9.5 cmd: mkdocs.exe build error:
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "d:\hzh_sfq\projects\shenzhen\docs\venv\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "d:\hzh_sfq\projects\shenzhen\docs\venv\lib\site-packages\click\core.py", line 763, in invoke
return callback(*args, **kwargs)
File "d:\hzh_sfq\projects\shenzhen\docs\venv\lib\site-packages\mkdocs_main.py", line 183, in build_command
build.build(config.load_config(**kwargs), dirty=not clean)
File "d:\hzh_sfq\projects\shenzhen\docs\venv\lib\site-packages\mkdocs\commands\build.py", line 249, in build
config = config['plugins'].run_event('config', config)
File "d:\hzh_sfq\projects\shenzhen\docs\venv\lib\site-packages\mkdocs\plugins.py", line 94, in run_event
result = method(item, **kwargs)
File "d:\hzh_sfq\projects\shenzhen\docs\venv\lib\site-packages\mkdocs_pdf_export_plugin\plugin.py", line 42, in on_config
from .renderer import Renderer
File "d:\hzh_sfq\projects\shenzhen\docs\venv\lib\site-packages\mkdocs_pdf_export_plugin\renderer.py", line 6, in
How to solve this problem?
This seems to be an EasyPrint issue. Please check Weasy print document.
I had a similar issue (with lib gobject.so.2) and it was because weasyprint requires a GTK3 runtime which needs to be installed on Windows: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer
After installing, it worked fine and it might be the same reason here.