It seems matplotlib does not see latex fonts.
command = ['latex', '-interaction=nonstopmode', '--halt-on-error', '/Users/a18677982/.matplotlib/tex.cache/9742f6a28f747e64d831a831c7fc5336.tex']
tex = 'nonlinear_n_mot_CT.png'
def _run_checked_subprocess(self, command, tex, *, cwd=None):
_log.debug(cbook._pformat_subprocess(command))
try:
report = subprocess.check_output(
command, cwd=cwd if cwd is not None else self.texcache,
stderr=subprocess.STDOUT)
except FileNotFoundError as exc:
raise RuntimeError(
'Failed to process string with tex because {} could not be '
'found'.format(command[0])) from exc
except subprocess.CalledProcessError as exc:
> raise RuntimeError(
'{prog} was not able to process the following string:\n'
'{tex!r}\n\n'
'Here is the full report generated by {prog}:\n'
'{exc}\n\n'.format(
prog=command[0],
tex=tex.encode('unicode_escape'),
exc=exc.output.decode('utf-8'))) from exc
E RuntimeError: latex was not able to process the following string:
E b'nonlinear_n_mot_CT.png'
E
E Here is the full report generated by latex:
E This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=latex)
E restricted \write18 enabled.
E entering extended mode
E (/Users/a18677982/.matplotlib/tex.cache/9742f6a28f747e64d831a831c7fc5336.tex
E LaTeX2e <2020-10-01> patch level 4
E L3 programming layer <2021-02-18>
E (/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls
E Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
E (/usr/local/texlive/2021/texmf-dist/tex/latex/base/size10.clo))
E (/usr/local/texlive/2021/texmf-dist/tex/latex/type1cm/type1cm.sty)
E (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/mathptmx.sty)
E (/usr/local/texlive/2021/texmf-dist/tex/latex/cm-super/type1ec.sty
E (/usr/local/texlive/2021/texmf-dist/tex/latex/base/t1cmr.fd))
E (/usr/local/texlive/2021/texmf-dist/tex/latex/base/inputenc.sty)
E (/usr/local/texlive/2021/texmf-dist/tex/latex/geometry/geometry.sty
E (/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/keyval.sty)
E (/usr/local/texlive/2021/texmf-dist/tex/generic/iftex/ifvtex.sty
E (/usr/local/texlive/2021/texmf-dist/tex/generic/iftex/iftex.sty)))
E (/usr/local/texlive/2021/texmf-dist/tex/latex/base/textcomp.sty)
E (/usr/local/texlive/2021/texmf-dist/tex/latex/psnfss/ot1ptm.fd)
E (/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-dvips.def)
E No file 9742f6a28f747e64d831a831c7fc5336.aux.
E *geometry* driver: auto-detecting
E *geometry* detected driver: dvips
E ! Missing $ inserted.
E <inserted text>
E $
E l.19 {\rmfamily nonlinear_
E n_mot_CT.png}
E No pages of output.
E Transcript written on 9742f6a28f747e64d831a831c7fc5336.log.
../../Library/Caches/pypoetry/virtualenvs/mot-2jybycYN-py3.9/lib/python3.9/site-packages/matplotlib/texmanager.py:260: RuntimeError```