[weasyprint] OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2


#1

WeasyPrint is a smart solution helping web developers to create PDF documents. https://weasyprint.org/

import weasyprint

Traceback (most recent call last):
at cell 12, line 1
at /opt/anaconda3/envs/datalore-user/lib/python3.6/site-packages/weasyprint/init.py, line 394
at /opt/anaconda3/envs/datalore-user/lib/python3.6/site-packages/weasyprint/css/init.py, line 25
at /opt/anaconda3/envs/datalore-user/lib/python3.6/site-packages/weasyprint/css/computed_values.py, line 17
at /opt/anaconda3/envs/datalore-user/lib/python3.6/site-packages/weasyprint/text.py, line 14
at /opt/anaconda3/envs/datalore-user/lib/python3.6/site-packages/cairocffi/init.py, line 41
at /opt/anaconda3/envs/datalore-user/lib/python3.6/site-packages/cairocffi/init.py, line 38, in dlopen
OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2


#2

WeasyPrint 43 has been released (11/9/2018)
https://weasyprint.org/news/#post-2

This version is the first stable version of WeasyPrint, 8 years after the idea was born. We would like to thank all our increadible contributors, bug reporters, pull requesters, real-life testers and 2200+ stargazers :).

Special thanks to Tontyna who helped a lot for this release, added really useful features and makes Windows’ users life easier <3.

This stable version is the beginning of a new era for WeasyPrint. The library has slowly evolved from a tiny toy to a real piece of software used by prestigious companies, cities and administrations all around the world.

We have built WeasyPrint to be the awesome document factory for our needs. We will work hard to make sure that it is your awesome document factory .

Dependencies

  • Python 3.4+ is now needed, Python 2.x is not supported anymore
  • Cairo 1.15.4+ is now needed, but 1.10+ should work with missing features (such as links, outlines and metadata)
  • Pdfrw is not needed anymore

#3

Thanks for the report, I created a ticket to investigate this issue.