-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dlopen() failed to load a library: cairo / cairo-2 #84
Comments
Looks like you don't have cairo installed. As explained on the cairo download page, the official way to install cairo seems to be to install Gtk+. They are currently different Gtk+ installers, such as:
|
Thanks a lot ! |
@marvinmirtschin Just for the record, which version of the installer did you use? |
I used the GTK2-Runtime installer. |
@marvinmirtschin I meet the same error |
Correctly installing Cairo on Windows is a nightmare. Being careful about 32/64bit seems to be important. You can follow very carefully the steps of the WeasyPrint documentation and see if it helps. |
On OS X (eg. El Capitan) this helped me: export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/usr/local/lib |
@liZe I've installed gtk, and add |
I've installed |
@gclsoft There's nothing more I can say that's not said in the documentation. Please remove all the versions of Python and Cairo installed on your system and follow the steps, not mixing 32/64bit packages. |
I had also Inkscape installed which has its own libcairo-2.dll and appeared before GTK in the PATH |
Yup, make sure the Python<->GTK archs match up. |
If you think, you've installed everything correctly, you can verify this, but running import ctypes.util
ctypes.util.find_library('cairo')
ctypes.util.find_library('cairo-2')
ctypes.util.find_library('libcairo-2') And see, which one has the correct path. If only Edit: Installing cairo for Python is probably easiest, if you install it via |
On Win7, changing the order in the PATH 'solved' it for me. Put the GTK path before Python path. |
I did execute, recommended by a user above. export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/usr/local/lib How can I reverse it? Thanks |
This helped me on a mac: https://weasyprint.readthedocs.io/en/stable/install.html#macos |
I read in an issue before, you can you cairocffi or pycairo but cffi seems not to work for me.
The text was updated successfully, but these errors were encountered: