Skip to content

Windows: WeasyPrint could not import some external libraries. #2742

@sdancer75

Description

@sdancer75

Backend error log

WeasyPrint could not import some external libraries. Please carefully follow the installation steps before reporting an issue:
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#troubleshooting

-----

[WARNING] WeasyPrint not available: cannot load library 'libgobject-2.0-0': error 0x7e.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'libgobject-2.0-0'

Solution

Install MSYS2 keeping the default options.
After installation, in MSYS2’s shell, execute pacman -S mingw-w64-x86_64-pango.
Close MSYS2’s shell.

After installation and setting the WEASYPRINT_DLL_DIRECTORIES=C:\msys64\mingw64\bin

PS D:> python -m weasyprint --info
System: Windows
Machine: AMD64
Version: 10.0.26100
Release: 11

WeasyPrint version: 67.0
Python version: 3.12.11
Pydyf version: 0.12.1
Pango version: 15604

https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions