Skip to content
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

OSError: no library called "cairo" was found #9

Open
dragonoverlord3000 opened this issue Jan 1, 2021 · 3 comments
Open

OSError: no library called "cairo" was found #9

dragonoverlord3000 opened this issue Jan 1, 2021 · 3 comments

Comments

@dragonoverlord3000
Copy link

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.

@kilacoda-old
Copy link
Collaborator

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!

@dragonoverlord3000
Copy link
Author

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.

@kilacoda-old
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants