kilacoda / chanim

Animation engine for explanatory chemistry videos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OSError: no library called "cairo" was found

dragonoverlord3000 opened this issue · comments

commented

I have cairo installed and manim is working fine, but I get this error:

OSError: no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': error 0x7e
cannot load library 'libcairo.2.dylib': error 0x7e
cannot load library 'libcairo-2.dll': error 0x7e

every time I try to run this:

from chanim import *

class ChanimScene(Scene):
def construct(self):
chem = ChemWithName("*6((=O)-N(-CH_3)-*5(-N=-N(-CH_3)-=)--(=O)-N(-H_3C)-)")

    self.play(chem.creation_anim())
    self.wait()

I had the exact same idea as you - a manim based chemistry animation engine. I stumbled over this project while searching for ways to create such a thing, I really hope I can get Chanim to work it's an awesome project.
Any help is appreciated.

Hmm, could you post the entire traceback please? It most likely is a Pango problem and not specifically related to chanim, but more info would be helpful here, especially since you say the rest of manim is working fine. Send the full traceback here as a comment or pastebin (or alternative) link please.

I had the exact same idea as you - a manim based chemistry animation engine. I stumbled over this project while searching for ways to create such a thing, I really hope I can get Chanim to work it's an awesome project.

Thank you for the kind words! I'll admit things are a bit of a mess here right now, I'm trying to patch it up slowly. Support like this gives me all the more motivation to stop slacking and actually put some effort here, haha!

commented

Thank you for the quick response, here's the entire traceback:

Traceback (most recent call last):
  File "c:\users\dragonoverlord\appdata\local\programs\python\python38\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\dragonoverlord\appdata\local\programs\python\python38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\dragonoverlord\AppData\Local\Programs\Python\Python38\Scripts\manim.exe\__main__.py", line 4, in <module>
  File "c:\users\dragonoverlord\appdata\local\programs\python\python38\lib\site-packages\manim\__init__.py", line 46, in <module>        
    from .mobject.svg.text_mobject import *
  File "c:\users\dragonoverlord\appdata\local\programs\python\python38\lib\site-packages\manim\mobject\svg\text_mobject.py", line 54, in 
<module>
    import cairocffi
  File "c:\users\dragonoverlord\appdata\local\programs\python\python38\lib\site-packages\cairocffi\__init__.py", line 48, in <module>
    cairo = dlopen(
  File "c:\users\dragonoverlord\appdata\local\programs\python\python38\lib\site-packages\cairocffi\__init__.py", line 45, in dlopen
    raise OSError(error_message)  # pragma: no cover
OSError: no library called "cairo" was found
cannot load library 'C:\Windows\system32\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 tried to reinstall Pango, but this error unfortunately still shows up - will look into ways around this problem.

Hi! Sorry for not responding in a while, was your issue resolved?