1

I'm trying to work with a notebook that requires cairo but I get the following error:

OSError: no library called "cairo-2" was found
no library called "cairo" was found
cannot load library 'C:\Program Files (x86)\GTK2-Runtime\bin\libcairo-2.dll': error 0xc1
cannot load library 'libcairo.so.2': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0xc1

I am opening the notebook through Pycharm and work with Windows 10. I have tried everything I have found on StackOverflow, including installing GKT+ or UniConverter2.0, adding the respective directory to my path to the Project interpreter in the way described here and restarting Pycharm. Nothing seems to work though.

Any ideas on what might be missing? I'm happy to provide further details that may help answer the question! As you can probably tell, I'm quite a newbie.

Thanks!

gimi
  • 395
  • 3
  • 13
  • First, you need `cairo`! `OSError: no library called "cairo-2" was found` i/e, `cairo` is not installed in this environment... then, maybe, we can help you to "make it work". – Reblochon Masque Dec 06 '21 at 04:48
  • @ReblochonMasque I have cairocffi installed already. Does that help? – gimi Dec 06 '21 at 05:14
  • @ReblochonMasque I also tried installing python-igraph as suggested [here](https://igraph.discourse.group/t/problem-installing-cairo-library/156) but that didn't seem to work either – gimi Dec 06 '21 at 05:27
  • 1
    I followed the instructions [here](https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#windows) and it worked! I see where the problem was now. Thanks @ReblochonMasque – gimi Dec 06 '21 at 05:44

1 Answers1

0

The error you're getting means that you've installed a 32bit version of the cairo dll. Installing a 64bit version solved this problem for me: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases

georgedeath
  • 419
  • 4
  • 10