Elteoremadebeethoven/AnimationsWithManim

Problems with "Cairo"

Closed this issue · 13 comments

Hi, I could run Manim on python 3.7.4. But after installing python3.7.5, Manim just doesn't work. When I tried to run it, it says' ModuleNotFoundError: No module named 'cairo'
And when I changed"import Cairo"into"import cairocffi as cairo". Another problem came up:"ValueError: Got a 480 bytes buffer, needs at least 1639680."
Could you tell me how to solve this?

You may have to install Pycairo, I don't know what operating system you use (it would be good if you indicated it), but otherwise, I have no idea how to fix it.

The OS I use is the latest Mac OS

I have the same issue. And I try to install pycairo. And nothing change.

Try install manim in Linux using virtualbox, I sugest Ubuntu, Manjaro or ArcoLinux

Sorry, I am a complete rookie in programming. Can you specify it? Thank you very much.

See this or...
Install virtualbox in your Mac (see youtube tutorials), then Install a Linux distro, you can se in youtube "How to install Ubuntu with virtualbox", then you can install manim in that virtual machine using "Install manim in GNU/Linux" video on my yt channel.

YiRuis-MacBook-Pro:manim-master carolmyr$ python3 -m manim example_scenes.py WriteStuff -pl
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/carolmyr/Manim/manim-master/manim.py", line 2, in
import manimlib
File "/Users/carolmyr/Manim/manim-master/manimlib/init.py", line 4, in
import manimlib.extract_scene
File "/Users/carolmyr/Manim/manim-master/manimlib/extract_scene.py", line 9, in
from manimlib.scene.scene import Scene
File "/Users/carolmyr/Manim/manim-master/manimlib/scene/scene.py", line 12, in
from manimlib.camera.camera import Camera
File "/Users/carolmyr/Manim/manim-master/manimlib/camera/camera.py", line 9, in
import cairo
ModuleNotFoundError: No module named 'cairo'

This the error I get, if it could help by the way.

yes, I read the link, and try the same thing as he did, but it still not work. (while I am using the terminal on mac.

In that case then there are only three possibilities, that you are doing it wrong, (that you have installed something wrong) or that it really is a problem, maybe because you use the most recent version of Mac, the modules probably have not yet been updated , or you installed version 3.8, in which case it does not work, you must use version 3.7.
Whatever the option, I can no longer do for you.

What you have left to do is install Manim in a virtual machine using VirtualBox as I told you in previous comments.

I think maybe it is because I am using the mac Catalina. I install python 3.7. Thank you very much. I will go try installing it in virtualbox.

I find out that it is important to set up a virtual environment. Here is the link helpful for this problem http://bhowell4.com/manic-install-tutorial-for-mac/.
Thank you very much again.