Elteoremadebeethoven/AnimationsWithManim

Error: Import Error : While running the manim.py.

Mathoholic opened this issue · 5 comments

~/manim# python3.7 -m manim example_scenes.py SquareToCircle -pl Traceback (most recent call last): File "/root/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/root/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code exec(code, run_globals) File "/root/manim/manim.py", line 2, in <module> import manimlib File "/root/manim/manimlib/__init__.py", line 4, in <module> import manimlib.extract_scene File "/root/manim/manimlib/extract_scene.py", line 9, in <module> from manimlib.scene.scene import Scene File "/root/manim/manimlib/scene/scene.py", line 12, in <module> from manimlib.camera.camera import Camera File "/root/manim/manimlib/camera/camera.py", line 9, in <module> import cairo File "/root/anaconda3/lib/python3.7/site-packages/cairo/__init__.py", line 1, in <module> from ._cairo import * # noqa: F401,F403 ImportError: /root/anaconda3/lib/python3.7/site-packages/cairo/_cairo.cpython-37m-x86_64-linux-gnu.so: undefined symbol: cairo_tee_surface_index

I watched your video I followed everystep shown in your video, the last step while running example_scenes.py, it gives import error.

Please Help, I am trying to install Manim since last 3 days :(

Thanks @Elteoremadebeethoven . This is resolved now. But I am facing another issue regarding Latex.

Choice(s): 1 sh: 1: latex: not found Traceback (most recent call last): File "/root/manim/manimlib/extract_scene.py", line 155, in main scene = SceneClass(**scene_kwargs) File "/root/manim/manimlib/scene/scene.py", line 53, in __init__ self.construct() File "example_scenes.py", line 20, in construct title = TextMobject("This is some \\LaTeX") File "/root/manim/manimlib/mobject/svg/tex_mobject.py", line 148, in __init__ self, self.arg_separator.join(tex_strings), **kwargs File "/root/manim/manimlib/mobject/svg/tex_mobject.py", line 44, in __init__ self.template_tex_file_body File "/root/manim/manimlib/utils/tex_file_writing.py", line 19, in tex_to_svg_file dvi_file = tex_to_dvi(tex_file) File "/root/manim/manimlib/utils/tex_file_writing.py", line 67, in tex_to_dvi "See log output above or the log file: %s" % log_file) Exception: Latex error converting to dvi. See log output above or the log file: ./media/Tex/664e80e8d8d98482.log

The Log file reads as follow:

\usepackage{dsfont} \usepackage{setspace} \usepackage{tipa} \usepackage{relsize} \usepackage{textcomp} \usepackage{mathrsfs} \usepackage{calligra} \usepackage{wasysym} \usepackage{ragged2e} \usepackage{physics} \usepackage{xcolor} \usepackage{microtype} \DisableLigatures{encoding = *, family = * } %\usepackage[UTF8]{ctex} \linespread{1} \begin{document} \centering This is some \LaTeX \end{document}

@Elteoremadebeethoven , My OS is Kali Linux, I installed Full TexLive, I can run tex from terminal and all other commands of tex are listed in terminal.
Please help.

Verify that you can run the latex command, (that is, that you have it in your PATH variable).
If you can't run it, find how to add the command to your PATH variable. If you can run it then you need packages to install, so you must reinstall texlive. I can't help you anymore.

Thanks for taking pain. I am Humbled.
I am reinstalling texlive now.

Hey, @Elteoremadebeethoven that worked I reinstalled Latex. MANIM is in actions.
Thanks to my deepest heart.