ACCarnall / bagpipes

Bagpipes is a state of the art code for generating realistic model galaxy spectra and fitting these to spectroscopic and photometric observations. Users should install with pip, not by cloning the repository.
http://bagpipes.readthedocs.io
GNU General Public License v3.0
78 stars 41 forks source link

RuntimeError: Failed to process string with tex because dvipng could not be found #87

Closed dongj17 closed 1 month ago

dongj17 commented 1 month ago

Hi! I'm new to Bagpipes. When I run Example 1 and use fig=model.plot(), fig=model.sfh.plot(), I get the following error: RuntimeError: Failed to process string with TeX because dvipng could not be found. Since I don't have administrator rights, I can't install dvipng via sudo yum install dvipng. Is there any other way to solve this problem?

ACCarnall commented 1 month ago

Hi, this is related to your matplotlib configuration options, you can read more here: https://matplotlib.org/stable/users/explain/text/usetex.html

You can also take a look at #14 for discussion of this, bagpipes doesn't interact as well as it could with the matplotlib config options. The guaranteed solution is to set tex_on=False on line 18 of bagpipes/plotting/general.py

dongj17 commented 1 month ago

Hi, After I set tex_on=False, error disappeared. Thank you very much!