Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3b65d42

Browse filesBrowse files
author
Joshua Taillon
authored
Try to use --without-gui for inkscape first
1 parent ce0f5bd commit 3b65d42
Copy full SHA for 3b65d42

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,12 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
330330
message = "Failed to find a Ghostscript installation"
331331
raise ExecutableNotFoundError(message)
332332
elif name == "inkscape":
333-
# use "no-gui" option for inkscape version detection:
334-
info = impl(["inkscape", "-z", "-V"], "^Inkscape ([^ ]*)")
333+
try:
334+
# use "without-gui" option (only works with inkscape version < 1.0):
335+
info = impl(["inkscape", "--without-gui", "-V"], "Inkscape ([^ ]*)")
336+
except subprocess.CalledProcessError as _cpe:
337+
# for inkscape v > 1.0, --without-gui is not needed:
338+
info = impl(["inkscape", "-V"], "Inkscape ([^ ]*)")
335339
if info and info.version >= "1.0":
336340
raise ExecutableNotFoundError(
337341
f"You have Inkscape version {info.version} but Matplotlib "

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.