---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
~/miniconda3/lib/python3.8/site-packages/matplotlib/texmanager.py in _run_checked_subprocess(self, command, tex, cwd)
232 try:
--> 233 report = subprocess.check_output(
234 command, cwd=cwd if cwd is not None else self.texcache,
~/miniconda3/lib/python3.8/subprocess.py in check_output(timeout, *popenargs, **kwargs)
414
--> 415 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
416 **kwargs).stdout
~/miniconda3/lib/python3.8/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
492
--> 493 with Popen(*popenargs, **kwargs) as process:
494 try:
~/miniconda3/lib/python3.8/subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
857
--> 858 self._execute_child(args, executable, preexec_fn, close_fds,
859 pass_fds, cwd, env,
~/miniconda3/lib/python3.8/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session)
1703 err_msg = os.strerror(errno_num)
-> 1704 raise child_exception_type(errno_num, err_msg, err_filename)
1705 raise child_exception_type(err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'latex'
The above exception was the direct cause of the following exception:
RuntimeError Traceback (most recent call last)
~/miniconda3/lib/python3.8/site-packages/IPython/core/formatters.py in __call__(self, obj)
339 pass
340 else:
--> 341 return printer(obj)
342 # Finally look for special method names
343 method = get_real_method(obj, self.print_method)
~/miniconda3/lib/python3.8/site-packages/IPython/core/pylabtools.py in print_figure(fig, fmt, bbox_inches, base64, **kwargs)
149 FigureCanvasBase(fig)
150
--> 151 fig.canvas.print_figure(bytes_io, **kw)
152 data = bytes_io.getvalue()
153 if fmt == 'svg':
~/miniconda3/lib/python3.8/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, pad_inches, bbox_extra_artists, backend, **kwargs)
2288 )
2289 with getattr(renderer, "_draw_disabled", nullcontext)():
-> 2290 self.figure.draw(renderer)
2291
2292 if bbox_inches:
~/miniconda3/lib/python3.8/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer, *args, **kwargs)
71 @wraps(draw)
72 def draw_wrapper(artist, renderer, *args, **kwargs):
---> 73 result = draw(artist, renderer, *args, **kwargs)
74 if renderer._rasterizing:
75 renderer.stop_rasterizing()
~/miniconda3/lib/python3.8/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer)
48 renderer.start_filter()
49
---> 50 return draw(artist, renderer)
51 finally:
52 if artist.get_agg_filter() is not None:
~/miniconda3/lib/python3.8/site-packages/matplotlib/figure.py in draw(self, renderer)
2801
2802 self.patch.draw(renderer)
-> 2803 mimage._draw_list_compositing_images(
2804 renderer, self, artists, self.suppressComposite)
2805
~/miniconda3/lib/python3.8/site-packages/matplotlib/image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite)
130 if not_composite or not has_images:
131 for a in artists:
--> 132 a.draw(renderer)
133 else:
134 # Composite any adjacent images together
~/miniconda3/lib/python3.8/site-packages/matplotlib/artist.py in draw_wrapper(artist, renderer)
48 renderer.start_filter()
49
---> 50 return draw(artist, renderer)
51 finally:
52 if artist.get_agg_filter() is not None:
~/miniconda3/lib/python3.8/site-packages/matplotlib/axes/_base.py in draw(self, renderer)
3044 artists.remove(spine)
3045
-> 3046 self._update_title_position(renderer)
3047
3048 if not self.axison:
~/miniconda3/lib/python3.8/site-packages/matplotlib/axes/_base.py in _update_title_position(self, renderer)
2994 _log.debug('top of Axes not in the figure, so title not moved')
2995 return
-> 2996 if title.get_window_extent(renderer).ymin < top:
2997 _, y = self.transAxes.inverted().transform((0, top))
2998 title.set_position((x, y))
~/miniconda3/lib/python3.8/site-packages/matplotlib/text.py in get_window_extent(self, renderer, dpi)
908
909 with cbook._setattr_cm(self.figure, dpi=dpi):
--> 910 bbox, info, descent = self._get_layout(self._renderer)
911 x, y = self.get_unitless_position()
912 x, y = self.get_transform().transform((x, y))
~/miniconda3/lib/python3.8/site-packages/matplotlib/text.py in _get_layout(self, renderer)
307
308 # Full vertical extent of font, including ascenders and descenders:
--> 309 _, lp_h, lp_d = renderer.get_text_width_height_descent(
310 "lp", self._fontproperties,
311 ismath="TeX" if self.get_usetex() else False)
~/miniconda3/lib/python3.8/site-packages/matplotlib/backends/backend_agg.py in get_text_width_height_descent(self, s, prop, ismath)
257 texmanager = self.get_texmanager()
258 fontsize = prop.get_size_in_points()
--> 259 w, h, d = texmanager.get_text_width_height_descent(
260 s, fontsize, renderer=self)
261 return w, h, d
~/miniconda3/lib/python3.8/site-packages/matplotlib/texmanager.py in get_text_width_height_descent(self, tex, fontsize, renderer)
333 if tex.strip() == '':
334 return 0, 0, 0
--> 335 dvifile = self.make_dvi(tex, fontsize)
336 dpi_fraction = renderer.points_to_pixels(1.) if renderer else 1
337 with dviread.Dvi(dvifile, 72 * dpi_fraction) as dvi:
~/miniconda3/lib/python3.8/site-packages/matplotlib/texmanager.py in make_dvi(self, tex, fontsize)
269 # not support.)
270 with TemporaryDirectory(dir=Path(dvifile).parent) as tmpdir:
--> 271 self._run_checked_subprocess(
272 ["latex", "-interaction=nonstopmode", "--halt-on-error",
273 f"../{texfile.name}"], tex, cwd=tmpdir)
~/miniconda3/lib/python3.8/site-packages/matplotlib/texmanager.py in _run_checked_subprocess(self, command, tex, cwd)
235 stderr=subprocess.STDOUT)
236 except FileNotFoundError as exc:
--> 237 raise RuntimeError(
238 'Failed to process string with tex because {} could not be '
239 'found'.format(command[0])) from exc
RuntimeError: Failed to process string with tex because latex could not be found
最新发布