Can not find the command 'pdflatex'
Steps to reproduce:
- Open Inkscape
- Click extensions --> Render --> Mathematics --> LaTeX (pdflatex)
- Write some latex expression (
x
for instance) in the LaTeX input field (no additional packages, no live preview) - Hit apply
What happened?
Dialog box pops up where it says "Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected." on the top, and then:
Traceback (most recent call last):
File "pdflatex.py", line 80, in <module>
LatexGenerate().run()
File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/base.py", line 111, in run
self.save_raw(self.effect())
File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/extensions.py", line 155, in effect for child in fragment:
File "pdflatex.py", line 51, in generate
halt_on_error=True, oldie=True)
File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/command.py", line 182, in call
return _call(program, *args, **kwargs)
File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/command.py", line 160, in _call
args = to_args(which(program), *args, **kwargs)
File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/command.py", line 79, in which
raise CommandNotFound("Can not find the command: '{}'".format(program))
inkex.command.CommandNotFound: Can not find the command: 'pdflatex'
What should have happened?
Latex expression should have been rendered. pdflatex is installed on my system and is on my PATH.
When I run
from distutils.spawn import find_executable
find_executable('pdflatex')
(which seems to be what fails in "command.py") the path to the pdflatex executable is found, no matter which of my python installations is used (native 2.7.16, anaconda 3.6.9). I have tried running this code from "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/", and the path is still found.
In addition, the Inkscape dialog box tells me that the script did not return an error, but only additional data, even though this is an error.
Inkscape Version and Operating System:
- Inkscape Version: 1.0beta1 (76ce730, 2019-10-19) (developer) and 1.0beta1
- Operating System: macOS Catalina
- Operating System version: 10.15.1