Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex error #3748

Closed
arp-learn opened this issue May 5, 2024 · 6 comments
Closed

Latex error #3748

arp-learn opened this issue May 5, 2024 · 6 comments

Comments

@arp-learn
Copy link

While running simple sample code (which is given in Quick start at Manim community) I am getting Latex error.
here is code:

`from manim import *

class HelloLaTeX(Scene):
def construct(self):
tex = Tex(r"\LaTeX", font_size=144)
self.add(tex)`

this is the error:
ValueError: latex error converting to dvi. See log output above or the log
file: media\Tex\07fd8c4c1d6550a5.log
[6700] Execution returned code=1 in 74.809 seconds returned signal null

Command failed:
'' is not recognized as an internal or external command,
operable program or batch file.

however, I had installed Latex using command

choco install manim-latex

please help.

@uwezi
Copy link
Contributor

uwezi commented May 5, 2024

Under Windows I would recommend to rather install MikTeX using its native Windows installer and not using Choco for this.

The error message simply means that Manim is not able to find the LaTeX executable, LaTeX is an external software which has nothing to do with Manim, but is needed by Manim to render mathematical equations in MathTex and text in Tex objects. In order for this to work, Manim/Python need to be able to call the corresponding executable files which thus have to be on the Windows search path.

On a Windows powershell or command prompt (from where you also execute Manim) try what you get when calling pdflatex --version

You can find MikTex and its installer here: https://miktex.org/howto/install-miktex

@arp-learn
Copy link
Author

@uwezi Sir, I had MikTeX already Installed. But, still this code, showing an error. Please help. Further, I had run above command, mentioned in your comment (pdflatex --version). This gives me following:

C:\Users\akash>pdflatex --version

MiKTeX-pdfTeX 2.9.7029 (1.40.20) (MiKTeX 2.9.7050 64-bit)
Copyright (C) 1982 D. E. Knuth, (C) 1996-2018 Han The Thanh
TeX is a trademark of the American Mathematical Society.
using bzip2 version 1.0.6, 6-Sept-2010
compiled with curl version 7.61.1; using libcurl/7.61.1 WinSSL
compiled with expat version 2.2.6; using expat_2.2.6
compiled with jpeg version 9.3
compiled with liblzma version 50020042; using 50020042
compiled with libpng version 1.6.35; using 1.6.35
compiled with libressl version LibreSSL 2.8.2; using LibreSSL 2.8.2
compiled with MiKTeX Application Framework version 4.6961; using 4.6961
compiled with MiKTeX Core version 14.7079; using 14.7079
compiled with MiKTeX Archive Extractor version 1.6882; using 1.6882
compiled with MiKTeX Package Manager version 6.7100; using 6.7100
compiled with poppler version 0.60.1
compiled with uriparser version 0.9.2
compiled with zlib version 1.2.11; using 1.2.11

As we can see, there are two version of Latex (since I already had MiTex installed on my Laptop, before installation of Manim)

@uwezi
Copy link
Contributor

uwezi commented May 5, 2024

can't we continue this discussion on Discord? Checking for new answers on github is a bit cumbersome...
https://docs.manim.community/en/stable/faq/general.html?highlight=discord#where-can-i-find-more-resources-for-learning-manim

Since your operating system seems to be able to find your latex, I have a hard time understanding the cause of your problem.

Oh wait a second now... your error message contains 2 parts. I only had seen the second one and assumed that you had omitted something like "latex.exe is not recognized..." but first it says that actually LaTeX was running on your code and produced and error which is supposed to be documented in media\Tex\07fd8c4c1d6550a5.log

So I have two questions now:
a) what is the missing part in "is not recognized as an internal or external command"

b) what is the content of media\Tex\07fd8c4c1d6550a5.log

@arp-learn
Copy link
Author

@uwezi ok sir, let's continues on the discord. But, I didn't how to post this question there. Further, I don't know about (a) & (b). Please help.

@uwezi
Copy link
Contributor

uwezi commented May 5, 2024

On Discord you would start a new discussion in the "help forum"

However, let's stay here...

a) in your original post you were citing parts of the output you got from Manim. But you left out some essential parts. Something is missing at the beginning of this line

bild

b) the message also gives the name of a file on your system media\Tex\07fd8c4c1d6550a5.log where media is a subdirectory in the same directory where you have stored your .py file. This file, 07fd8c4c1d6550a5.log , is generated by LaTeX and may contain important information about the cause of your problem.

bild

@JasonGrace2282
Copy link
Contributor

Closing due to inactivity

@JasonGrace2282 JasonGrace2282 closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants