[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(python) ctypes.util.find_library full path ?

From: zimoun
Subject: (python) ctypes.util.find_library full path ?
Date: Fri, 22 Feb 2019 15:51:17 +0100


I would like to try WeasyPrint [1] to convert some HTML docs to PDF
ones and maybe print them. Or maybe presentation etc.


Well, excluding the check phase at first because some dependencies
does not seem clean with Python2/Python3. Anyway!

it is almost straightforward with `guix import pypi -r weasyprint'. Awesome !
(there is some tweaks in url: "cairosvg" -> "CairoSVG")

However, the command `weasyprint` fails at run time. Because an issue
about `dlopen'.

To be precise, and from my understanding, the culprit is these lines:

In other word, ctypes.util.find_library('cairo') returns the expected
But then it is not recognized by their `ffi.dlopen`.
And if the full path is provided then it works, e.g.,
 <Lib object for

There is an old "similar" issue on the bug Nix tracker #7307 [2],
asking if `ctypes.util.find_library` should return full path (so apply
somehow a patch) or add another env variable. I do not know what is
the status now.


My questions is: is there a fix for this kind of issue ?
I guess, it should happen with Python packages.

If yes, what is the trick ?
If no, what should be the trick ? What do you think ?

Thank you for any pointer and/or comments.

All the best,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]