Exception: Latex error converting to dvi.
See original GitHub issueHi. When I installed Manim, I first tried to render an animation to see if it works. I first issued the command below to render the Square to Circle example, and it did well.
python3 ./manim.py example_scenes.py SquareToCircle -pl
But, whenever I try to render the other examples provided, it always makes the same error.
Exception: Latex error converting to dvi. See log output above or the log file: media/Tex/664e80e8d8d98482.log
Command issued : sudo -H python3 -m manim example_scenes.py OpeningManimExample -pl
This is the complete console log :
Media will be written to ./media/. You can change this behavior with the --media_dir flag.
latex: warning: running with administrator privileges
Sorry, but latex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
/var/root/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log
Traceback (most recent call last):
File "/Users/mac/Downloads/manim-master/manimlib/extract_scene.py", line 155, in main
scene = SceneClass(**scene_kwargs)
File "/Users/mac/Downloads/manim-master/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 "/Users/mac/Downloads/manim-master/manimlib/mobject/svg/tex_mobject.py", line 147, in __init__
SingleStringTexMobject.__init__(
File "/Users/mac/Downloads/manim-master/manimlib/mobject/svg/tex_mobject.py", line 42, in __init__
file_name = tex_to_svg_file(
File "/Users/mac/Downloads/manim-master/manimlib/utils/tex_file_writing.py", line 20, in tex_to_svg_file
dvi_file = tex_to_dvi(tex_file)
File "/Users/mac/Downloads/manim-master/manimlib/utils/tex_file_writing.py", line 70, in tex_to_dvi
raise Exception(
Exception: Latex error converting to dvi. See log output above or the log file: media/Tex/664e80e8d8d98482.log
I tried to search on google for any help, but all the that I read was about the same issue but on Windows, and I’m on mac. However, I continued searching and found this on StackOverflow :
That answer is no longer useful now because Manim has already solved that problem. So this may be due to two things: To give us a hint of what is wrong, go to the manimlib folder with the terminal and run the following:
latex tex_template.tex
We distinguish the two possible errors:Recognized the latex command but the compilation could not be completed because you are missing libraries, to solve this you can install the missing packages indicated by the terminal.
That LaTeX is not recognized as a command, in this case surely the PATH variable is not set correctly, here is the solution.
So I went to the manimlib folder and issued the following : latex tex_template.tex
. And judging by the console log, it doesn’t seem like its the second option because the latex command was recognized, but there is no further information about what’s missing. This is the complete console log :
MacBook-Pro-de-MAC:manimlib mac$ latex tex_template.tex
log4cxx: setFile(/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log,true) call failed.
log4cxx: IO Exception : status code = 13
log4cxx: No output stream or file set for the appender named [RollingLogFile].
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250)
Sorry, but latex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log
MacBook-Pro-de-MAC:manimlib mac$ latex tex_template.tex
log4cxx: setFile(/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log,true) call failed.
log4cxx: IO Exception : status code = 13
log4cxx: No output stream or file set for the appender named [RollingLogFile].
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250)
Sorry, but latex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log
MacBook-Pro-de-MAC:manimlib mac$ latex tex_template.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250)
Sorry, but latex did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log
So I went to see what’s on the latex.log
file, and found this :
2020-01-28 21:28:52,077+0100 INFO texworks - starting: MiKTeX TeXworks 0.6.3 (MiKTeX 2.9.7250)
2020-04-08 17:31:28,130+0100 INFO latex - starting with command line: latex tex_template.tex
2020-04-08 17:31:28,135+0100 INFO latex - allowing known shell commands
2020-04-08 17:31:28,135+0100 INFO latex - enabling input (output) from (to) processes
2020-04-08 17:31:28,151+0100 INFO latex - going to create file: latex.fmt
2020-04-08 17:31:29,772+0100 ERROR latex - /usr/local/bin/initexmf did not succeed; exitCode: 1
2020-04-08 17:31:29,772+0100 ERROR latex - output:
2020-04-08 17:31:29,772+0100 ERROR latex - log4cxx: setFile(/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/initexmf.log,true) call failed.
log4cxx: IO Exception : status code = 13
log4cxx: No output stream or file set for the appender named [RollingLogFile].
Sorry, but "MiKTeX Configuration Utility" did not succeed.
The log file hopefully contains the information to get MiKTeX going again:
/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/initexmf.log
2020-04-08 17:31:29,774+0100 FATAL latex - The memory dump file could not be found.
2020-04-08 17:31:29,774+0100 INFO latex - finishing with exit code 1
But I have no clue what to do. Will appreciate the help.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12
Top GitHub Comments
Latex error converting to dvi has more than one thread in this repo. I tried every option which is mentioned here on git and the final solution was to use other distribution then MiKTeX (https://www.latex-project.org/get/), concretely TeX Live. After uninstall of MiKTeX, install Tex Live and restart my computer, everything works fine.
I had a same problem with you. And I fix that by adding package \usepackage{ucs} in tex file tex_template (manimlib/tex_template). I hope that help you fix this.