Я запускаю это в блокноте jupyter.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib.animation as animation
%matplotlib inline
Я пытался запустить его как файл .py
, но я получаю ту же ошибку.
Я получаю следующую ошибку :
CalledProcessError Traceback (most recent call last)
<ipython-input-1-ca83d359d5da> in <module>
2 import pandas as pd
3 import matplotlib.pyplot as plt
----> 4 import matplotlib.animation as animation
5 get_ipython().run_line_magic('matplotlib', 'inline')
~/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
~/anaconda3/lib/python3.7/site-packages/matplotlib/__init__.py in _get_executable_info(name)
382 raise FileNotFoundError(
383 "Failed to find an ImageMagick installation")
--> 384 return impl([path, "--version"], r"^Version: ImageMagick (\S*)")
385 elif name == "pdftops":
386 info = impl(["pdftops", "-v"], "^pdftops version (.*)",
~/anaconda3/lib/python3.7/site-packages/matplotlib/__init__.py in impl(args, regex, min_ver, ignore_exit_code)
327 output = _cpe.output
328 else:
--> 329 raise _cpe
330 match = re.search(regex, output)
331 if match:
~/anaconda3/lib/python3.7/site-packages/matplotlib/__init__.py in impl(args, regex, min_ver, ignore_exit_code)
322 try:
323 output = subprocess.check_output(
--> 324 args, stderr=subprocess.STDOUT, universal_newlines=True)
325 except subprocess.CalledProcessError as _cpe:
326 if ignore_exit_code:
~/anaconda3/lib/python3.7/subprocess.py in check_output(timeout, *popenargs, **kwargs)
393
394 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
--> 395 **kwargs).stdout
396
397
~/anaconda3/lib/python3.7/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
485 if check and retcode:
486 raise CalledProcessError(retcode, process.args,
--> 487 output=stdout, stderr=stderr)
488 return CompletedProcess(process.args, retcode, stdout, stderr)
489
CalledProcessError: Command '['convert', '--version']' returned non-zero exit status 1.