8000 Merge pull request #11889 from meeseeksmachine/auto-backport-of-pr-11… · matplotlib/matplotlib@1f10661 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 1f10661

Browse files
authored
Merge pull request #11889 from meeseeksmachine/auto-backport-of-pr-11847-on-v3.0.x
Backport PR #11847 on branch v3.0.x
2 parents 6ba0562 + 53a070e commit 1f10661

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/matplotlib/animation.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,17 @@ def _init_from_registry(cls):
735735
0, winreg.KEY_QUERY_VALUE | flag)
736736
binpath = winreg.QueryValueEx(hkey, 'BinPath')[0]
737737
winreg.CloseKey(hkey)
738-
binpath += r'\convert.exe'
739738
break
740739
except Exception:
741740
binpath = ''
741+
if binpath:
742+
for exe in ('convert.exe', 'magick.exe'):
743+
path = os.path.join(binpath, exe)
744+
if os.path.exists(path):
745+
binpath = path
746+
break
747+
else:
748+
binpath = ''
742749
rcParams[cls.exec_key] = rcParamsDefault[cls.exec_key] = binpath
743750

744751
@classmethod

0 commit comments

Comments
 (0)
0