question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

latex: command not found}{c}\quad \\\quad \\\end{array}\right]

See original GitHub issue

Describe the bug

The display of example scene went wrong while running. Tex File doesn’t exist.

Code:

  1. Clone the repo
  2. cd into and pip install -e .
  3. manimgl example_scenes.py OpeningManimExample as described in the README

Wrong display or Error traceback:

MacBook-Pro:manim ppamorim$ manimgl example_scenes.py OpeningManimExample
ManimGL v1.2.0
[02:01:09] INFO     Using the default configuration file, which    config.py:231
                    you can modify in `/Users/ppamorim/Repository/              
                    manim/manimlib/default_config.yml`                          
           INFO     If you want to create a local configuration    config.py:232
                    file, you can create a file named                           
                    `custom_config.yml`, or run `manimgl --config`              
2021-10-24 02:01:10.115 Python[85523:5352478] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/dj/m6vp0jsx1r76hcjg4w3p_gq40000gp/T/org.python.python.savedState
sh: latex: command not found}{c}\quad \\\quad \\\end{array}\right]"             
[02:01:14] ERROR    LaTeX Error!  Not a worry, it happens tex_file_writing.py:90
                    to the best of us.                                          
Traceback (most recent call last):                                 
  File "/usr/local/bin/manimgl", line 33, in <module>
    sys.exit(load_entry_point('manimgl', 'console_scripts', 'manimgl')())
  File "/Users/ppamorim/Repository/manim/manimlib/__main__.py", line 25, in main
    scene.run()
  File "/Users/ppamorim/Repository/manim/manimlib/scene/scene.py", line 76, in run
    self.construct()
  File "example_scenes.py", line 29, in construct
    IntegerMatrix(matrix, include_background_rectangle=True),
  File "/Users/ppamorim/Repository/manim/manimlib/mobject/matrix.py", line 81, in __init__
    self.add_brackets()
  File "/Users/ppamorim/Repository/manim/manimlib/mobject/matrix.py", line 111, in add_brackets
    bracket_pair = Tex("".join([
  File "/Users/ppamorim/Repository/manim/manimlib/mobject/svg/tex_mobject.py", line 162, in __init__
    super().__init__(full_string, **kwargs)
  File "/Users/ppamorim/Repository/manim/manimlib/mobject/svg/tex_mobject.py", line 41, in __init__
    filename = tex_to_svg_file(full_tex)
  File "/Users/ppamorim/Repository/manim/manimlib/utils/tex_file_writing.py", line 52, in tex_to_svg_file
    tex_to_svg(tex_file_content, svg_file)
  File "/Users/ppamorim/Repository/manim/manimlib/utils/tex_file_writing.py", line 60, in tex_to_svg
    svg_file = dvi_to_svg(tex_to_dvi(tex_file))
  File "/Users/ppamorim/Repository/manim/manimlib/utils/tex_file_writing.py", line 91, in tex_to_dvi
    with open(log_file, "r") as file:
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/dj/m6vp0jsx1r76hcjg4w3p_gq40000gp/T/Tex/c3372cf5b2620435.log'

Additional context

MacOS Big Sur, MBP M1 manim version: master python version: 3.9.7

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
longlongvipcommented, Dec 17, 2021

中文

Windows解决方案

  • 1.在C盘创建TempLatex(具体什么名字按你的喜好来)目录
  • 2.在manim(manimgl版本)目录中找到manimlib/default_config.yml并使用文本编辑器打开
  • 3.修改第18行 之前:temporary_storage: “” 之后:temporary_storage: “C:/TempLatex”
  • 4.保存

English

Windows Solution

  • 1.Create TempLatex directory in C drive
  • 2.Find manimlib/default_config.yml in the manim (manimgl version) directory and open it with a text editor
  • 3.Modify line 18: before: temporary_storage: “” after: temporary_storage: "C:/TempLatex "
  • 4.Save
0reactions
vtnilcommented, Nov 2, 2022

I have the same problem, solved by adding LaTex to the environment variable.

export PATH="/usr/local/texlive/2022/bin/universal-darwin:$PATH"

The reason is the MacTeX installer not update the environment variable automatically.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Texmaker: command not found on MacOS El Capitan - TeX
Normal tex seems to work just fine, but tikzpictures with tikzexternal don't. I added -shell-escape to the pdflatex command which worked fine ...
Read more >
I got sh: latex: command not found error when try to text latex ...
says that manim tries, to find latex but couldn't find it. Possibly you may not have installed latex. Assuming you are on Ubuntu...
Read more >
LATEX Command Summary
quad (math mode). \@ declares the period that follows is to be a sentence-ending period. \[ — same as \begin{displaymath} ...
Read more >
Dealing with errors - learnlatex.org
A common first error that people see when starting is: 'pdflatex' is not recognized as an internal or external command, operable program or...
Read more >
Horizontal spacing in maths - andy-roberts.net
LATEX has defined two commands that can be used anywhere in documents (not just maths) to insert some horizontal space. They are: \quad...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found