Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9408937 commit 4e2780cCopy full SHA for 4e2780c
1 file changed
lib/matplotlib/backends/backend_pgf.py
@@ -6,6 +6,7 @@
6
import math
7
import os
8
import sys
9
+import errno
10
import re
11
import shutil
12
import tempfile
@@ -316,8 +317,14 @@ def __init__(self):
316
317
stdin=subprocess.PIPE,
318
stdout=subprocess.PIPE,
319
cwd=self.tmpdir)
- except OSError:
320
- raise RuntimeError("Error starting process '%s'" % self.texcommand)
+ except OSError, e:
321
+ if e.errno == errno.ENOENT:
322
+ raise OSError(errno.ENOENT, "Latex command not found. "
323
+ "Install '%s' or change pgf.texsystem to the desired command."
324
+ % self.texcommand
325
+ )
326
+ else:
327
+ raise RuntimeError("Error starting process '%s'" % self.texcommand)
328
test_input = self.latex_header + latex_end
329
stdout, stderr = latex.communicate(test_input.encode("utf-8"))
330
if latex.returncode != 0:
0 commit comments