Getting “OSError: dlopen() failed to load a library: cairo / cairo-2” on Windows

后端 未结 3 1911
长情又很酷
长情又很酷 2021-01-12 05:45

I\'m getting OSError: dlopen() failed to load a library: cairo / cairo-2 when trying to execute Django after a new install. Using Windows.

I\'m using We

相关标签:
3条回答
  • 2021-01-12 06:01

    I got following error message: OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2, on Windows 10.

    The GTK+ libraries which contain the libraries above can be obtained and installed from https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer, as documented on https://weasyprint.readthedocs.io/en/latest/install.html#gtk64installer.

    Note that your development environment will need to be restarted to read PATH.

    0 讨论(0)
  • 2021-01-12 06:14

    I had same problem on windows X64/Python37 but i fixed with bellow link:

    follow this steps : https://weasyprint.readthedocs.io/en/stable/install.html#windows, (i installed gtk with MSYS Installer and added C:\msys64\mingw32\bin to PATH variable,after that i occurred with same error and i deleted cairocffi python library and reinstall it)

    0 讨论(0)
  • 2021-01-12 06:19

    See http://win32builder.gnome.org/ or http://gtk-win.sourceforge.net/home/ for a list of GTK+ bundles to install. These include the required cairo/cairo-2 libs.

    • Extract the contents of the bin\ folder to e.g. C:\Program Files (x86)\GTK2-bundle\ (any directory would do)
    • Add the above directory to your PATH environment variable
    • Restart your development environment (in my case PyCharm)
    0 讨论(0)
提交回复
热议问题