Reputation: 127
I'm trying to install WeasyPrint. I'm running Windows 10, 64 bit. I've followed the install guide on their website. Note that I'm new to this. I've spent the past two days trying to install pango and cairo, read about every post online about it but can't get it right. So far I've installed:
The problem is I cannot get Cairo and Pango.
The libraries on the pango download page aren't linked correctly.
I've installed Cairo via the link on their website to GTK+. The instructions only give an option for Win32. I've tried installing it with no success.
The goal is to get WeasyPrint to run. I've managed to install it, but it doesn't work as Pango/Cairo are not installed.
Upvotes: 2
Views: 8372
Reputation: 9572
I am also on Windows 10 64-bit. You might have the same issue that I had. Cairo et al. is installed, but due to DLL Hell, it won't load correctly due to a conflicting version of one of its dependencies installed elsewhere on your system.
I started with the WeasyPrint install instructions for Windows. This alone was not sufficient. I also had to modify my PATH
variable so that the GTK folder (C:\Program Files\GTK3-Runtime Win64\bin
if you follow the instructions) was higher up in the list. After this, I restarted and WeasyPrint ran like normal.
Upvotes: 1
Reputation: 63
This is a common issue that I've come across. If you still get the error after installing cairo the recommended way (GTK+) and you are sure the dll's are in the environment path then the issue is likely a driver conflict.
Cairo depends on some specific dll's to be present but Intel wifi drivers commonly use the same drivers but with a different version, this causes cairo to not detect the correct functions within the dll's because it's accessing the wrong dll.
To resolve this I usually use Dependency Walker and then I open the Cairo dll where gtk is installed and I find the paths that the libraries are present on that Cairo depends on. I do this by finding the library name in Dependency walker and then typing it into the window search bar. Give it a few seconds to find the dll's and then you right-click it and select "open file location". If the file is in a different directory from the one that gtk is installed in and if there is a dll with the same name in the gtk directory, delete or rename it.
You might need to do this with a couple of dll's.
WARNING: this might break some functionality in the programs that you delete the dll from.
P.S. Don't use weasyprint. I learned that the hard way.
Upvotes: 0