I want to run some Python code from the WeasyPrint library on a server running Debian GNU/Linux 8. The code actually appears to be working, except WeasyPrint gives a warning every time the code is run:
/home/username/venv/lib/python3.7/site-packages/weasyprint/document.py:36: UserWarning: There are known rendering problems and missing features with cairo < 1.15.4.
/home/username/venv/lib/python3.7/site-packages/weasyprint/fonts.py:44: UserWarning: @font-face support needs Pango >= 1.38
To investigate this, I first looked at what versions I had in my pip list
. When installing WeasyPrint, I used python -m pip install weasyprint
, which installed maybe 10 dependencies. However, the only stuff related to Cairo appears to be CairoSVG v2.4.2
, cairocffi v1.1.0
, and cffi 1.12.3
. Nothing in my pip list
has just the name "Cairo". I thought that maybe cairocffi
was possibly what I needed to look at, but using python -m pip install cairocffi -U
yielded no found update. Further, the Cairo website suggests using sudo apt-get install libcairo2-dev
, however the prompt returns a message saying that "libcairo2-dev is already the newest version."
I became especially confused when taking the opportunity at this point in my meandering search to investigate the problem with Pango. I used find -type d -name "*pango*"
in the Python virtual environment directory I'm using, and found no directory even with the name pango. According to the website, Pango is integrated with Cairo, but since python -m pip install weasyprint
installs cairocffi, and my find
returned no results, I'm confused as to where the Pango functionality even is currently. I found the source packages for Pango, but I don't know where I would even put these files to replace the existing code. I also have no experience downloading/installing Python packages from source, let alone when I can't even figure out how my current setup is working.
What is the relationship between cairocffi and cairo? Likewise, what is Pango's relationship with cairocffi versus cairo? How should I continue forward to resolve the version warnings I'm encountering?
If this is not the right place to post this, please direct me to a more appropriate area and I'll take it there.