0 votes
I am running a notebook that worked last time I logged into DataLab, but now am getting the following error when trying to plot using matplotlib.pyplot:

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

Any idea what has recently changed that would have made matplotlib unable to locate latex/dvipng?
asked Sep 7 by jcarlin (160 points) | 41 views
Here are the contents of the cell I am trying to execute:

params = {
   'axes.labelsize': 20,
   'font.size': 20,
   'legend.fontsize': 14,
#   'xtick.labelsize': 16,
   'xtick.major.width': 3,
   'xtick.minor.width': 2,
   'xtick.major.size': 8,
   'xtick.minor.size': 5,
   'xtick.direction': 'in',
   'xtick.top': True,
   'ytick.major.size': 8,
   'ytick.minor.size': 5,
   'ytick.direction': 'in',
   'ytick.right': True,
#   'ytick.labelsize': 20,
   'text.usetex': True,
   'text.latex.preamble': r'\boldmath',
   'figure.figsize': [7,9]


plt.plot(g0[star & cen]-i0[star & cen],i0[star & cen],'c.',alpha=0.2)

1 Answer

0 votes
Actually, I logged out of DataLab and logged back in, and this problem went away. I'm guessing that my login was "stale," and my path wasn't set up correctly...
answered Sep 7 by jcarlin (160 points)
I can't explain why it previously might have worked, however 'dvipng' was not installed on the machine.  It was installed but I became distracted before replying so it's possible that you picked up the new binary afterwards.

198 questions

195 answers


1,364 users

Welcome to Data Lab Help Desk, where you can ask questions and receive answers from other members of the community.