I'm using WeasyPrint in a web2py application to generate a PDF.
I have a test environment/account on PythonAnywhere and the application works fine. I've created a separate account (for a client) to host the production version.
I'm not using a virtualenv (I know I probably should) but as far as I can tell the two environments are identical with the same packages and dependencies for WeasyPrint installed in both user environments (using pip install --user ...).
I can also successfully run WeasyPrint in a console using:
$ weasyprint http://weasyprint.org ./weasyprint-website.pdf
But when my application runs and tries to call WeasyPrint I get the following error:
OSError: dlopen() failed to load a library: cairo / cairo-2
Thanks in advance for any help!