3b1b / manim

Animation engine for explanatory math videos
MIT License
68.8k stars 6.1k forks source link

Starter example missing log file #2034

Open elliottower opened 1 year ago

elliottower commented 1 year ago

Describe the bug

Just a minor bug, seems that the starter example references a log file which isn't included in the repo. Probably an easy fix.

Code:

I tried both manim-render example_scenes.py OpeningManimExample and manimgl example_scenes.py OpeningManimExample, the first two commands the README says to test out

Wrong display or Error traceback:

Here's the full error:

[17:23:40] ERROR    LaTeX Error!  Not a worry, it happens to the best of us.                                                                                                                                                     tex_file_writing.py:114
Traceback (most recent call last):                              
  File "/Users/elliottower/anaconda3/envs/umshini/bin/manim-render", line 8, in <module>
    sys.exit(main())
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/__main__.py", line 25, in main
    scene.run()
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/scene/scene.py", line 160, in run
    self.construct()
  File "example_scenes.py", line 29, in construct
    IntegerMatrix(matrix, include_background_rectangle=True),
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/matrix.py", line 204, in __init__
    super().__init__(matrix, element_alignment_corner=element_alignment_corner, **kwargs)
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/matrix.py", line 99, in __init__
    self.add_brackets(bracket_v_buff, bracket_h_buff)
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/matrix.py", line 144, in add_brackets
    brackets = Tex("".join((
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/tex_mobject.py", line 57, in __init__
    super().__init__(
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/string_mobject.py", line 68, in __init__
    super().__init__(
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/svg_mobject.py", line 76, in __init__
    self.init_svg_mobject()
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/svg_mobject.py", line 105, in init_svg_mobject
    submobs = self.mobjects_from_file(self.get_file_path())
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/string_mobject.py", line 78, in get_file_path
    return self.get_file_path_by_content(self.get_content(is_labelled))
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/tex_mobject.py", line 85, in get_file_path_by_content
    return tex_content_to_svg_file(
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/utils/tex_file_writing.py", line 83, in tex_content_to_svg_file
    create_tex_svg(full_tex, svg_file, compiler)
  File "/Users/elliottower/Documents/GitHub/manim/manimlib/utils/tex_file_writing.py", line 118, in create_tex_svg
    with open(root + ".log", "r", encoding="utf-8") as log_file:
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/5y/hjb1rykx58xcbwg6r04m76tr0000gn/T/Tex/c3372cf5b2620435.log'

Additional context

timothestes commented 1 year ago

Getting the same error on a fresh install on MacOS!

MovieJo commented 1 year ago

it solved with sudo apt install texlive-latex-base in my WSL ubuntu

this occured in error printing, and my error message is

The error could be: `LaTeX Error: File `standalone.cls' not found.`

is solved with sudo apt install texlive-latex-extra

and new error message

The error could be: `LaTeX Error: File `dsfont.sty' not found.`

is solved with sudo apt install texlive-fonts-extra

and new error message

The error could be: `LaTeX Error: File `physics.sty' not found.`

is solved with sudo apt install texlive-science

and at last I can run full example

alex-skyfora commented 1 year ago

Getting the same error on Windows 11 after following step by step the installation instructions:

-Installed FFmpeg -Installed MiKTeX according to provided instructions in the link -Installed manimgl with pip install -e .

Verified that latex is correctly installed by checking latex -version on the command line.

dongrixinyu commented 9 months ago

Getting the same error on Windows 11 after following step by step the installation instructions:

-Installed FFmpeg -Installed MiKTeX according to provided instructions in the link -Installed manimgl with pip install -e .

Verified that latex is correctly installed by checking latex -version on the command line.

I have installed miktex but have not found any latex command yet. why?

JakeMawson commented 6 days ago

What I found worked for me (mac):

https://github.com/3b1b/manim/issues/2133#issuecomment-2414547866

Run sudo tlmgr install standalone

Also these others may help:

sudo tlmgr update --self sudo tlmgr install amsmath amssymb dvisvgm cm-super sudo tlmgr install collection-latexrecommended sudo tlmgr install collection-fontsrecommended sudo tlmgr install standalone sudo tlmgr install preview sudo tlmgr install doublestroke sudo tlmgr install relsize sudo tlmgr install fundus-calligra sudo tlmgr install physics

If tlmgr is not found, run: echo 'export PATH="/Library/TeX/texbin:$PATH"' >> ~/.zshrc\n (to add to path)