модуль 'matplotlib' не имеет атрибута '_get_executable_info' при импорте matplotlib.animation - PullRequest
0 голосов
/ 21 февраля 2020

Я пытаюсь импортировать matplotlib.animation, но по какой-то причине этого не происходит. Я обновил matplotlib до последней версии, используя pip. Я использую python 3,7 в ноутбуке Jupyter

Вот трассировка

<ipython-input-237-b2ea7dba549a> in <module>()
      1 import matplotlib.pyplot as plt
      2 import matplotlib.image as mpimg
----> 3 import matplotlib.animation
      4 import copy
      5 import glob, os

/anaconda3/lib/python3.7/site-packages/matplotlib/animation.py in <module>()
    735 # Combine ImageMagick options with pipe-based writing
    736 @writers.register('imagemagick')
--> 737 class ImageMagickWriter(ImageMagickBase, MovieWriter):
    738     '''Pipe-based animated gif.
    739 

/anaconda3/lib/python3.7/site-packages/matplotlib/animation.py in wrapper(writerClass)
    118         def wrapper(writerClass):
    119             self._registered[name] = writerClass
--> 120             if writerClass.isAvailable():
    121                 self.avail[name] = writerClass
    122             return writerClass

/anaconda3/lib/python3.7/site-packages/matplotlib/animation.py in isAvailable(cls)
    728     def isAvailable(cls):
    729         try:
--> 730             return super().isAvailable()
    731         except FileNotFoundError:  # May be raised by get_executable_info.
    732             return False

/anaconda3/lib/python3.7/site-packages/matplotlib/animation.py in isAvailable(cls)
    425         Check to see if a MovieWriter subclass is actually available.
    426         '''
--> 427         return shutil.which(cls.bin_path()) is not None
    428 
    429 

/anaconda3/lib/python3.7/site-packages/matplotlib/animation.py in bin_path(cls)
    722         binpath = super().bin_path()
    723         if binpath == 'convert':
--> 724             binpath = mpl._get_executable_info('magick').executable
    725         return binpath
    726 

AttributeError: module 'matplotlib' has no attribute '_get_executable_info'```

1 Ответ

0 голосов
/ 21 февраля 2020

Оказывается, мне пришлось установить ImageMagick и переустановить matplotlib после этого.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...