diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index 8a2a4b36e0e1..f18dcf037c94 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -331,7 +331,7 @@ def impl(args, regex, min_ver=None): f"{' '.join(args)}, which output {output}") if name == "dvipng": - return impl(["dvipng", "-version"], "(?m)^dvipng .* (.+)", "1.6") + return impl(["dvipng", "-version"], "(?m)^dvipng(?: .*)? (.+)", "1.6") elif name == "gs": execs = (["gswin32c", "gswin64c", "mgs", "gs"] # "mgs" for miktex. if sys.platform == "win32" else