Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce0f5bd

Browse files
author
Joshua Taillon
authored
Change subprocess for inkscape version detection
Use the `--no-gui` (`-z`) for inkscape to prevent depending on an X server for version detection
1 parent 9e20541 commit ce0f5bd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ 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-
info = impl(["inkscape", "-V"], "^Inkscape ([^ ]*)")
333+
# use "no-gui" option for inkscape version detection:
334+
info = impl(["inkscape", "-z", "-V"], "^Inkscape ([^ ]*)")
334335
if info and info.version >= "1.0":
335336
raise ExecutableNotFoundError(
336337
f"You have Inkscape version {info.version} but Matplotlib "

0 commit comments

Comments
 (0)