Reputation: 31
Any ideas what to do about the following error in my spyder (5.0.0) console?
Output from spyder call 'show_mpl_backend_errors':
=========================================================================
NOTE: The following error appeared when setting your Matplotlib backend!!
=========================================================================
Traceback (most recent call last):
File "C:\Users\hana\anaconda3\lib\site-packages\spyder_kernels\console\kernel.py", line 735, in _set_mpl_backend
get_ipython().run_line_magic(magic, backend)
File "C:\Users\hana\AppData\Roaming\Python\Python38\site-packages\IPython\core\interactiveshell.py", line 2326, in run_line_magic
result = fn(*args, **kwargs)
File "<decorator-gen-109>", line 2, in matplotlib
File "C:\Users\hana\AppData\Roaming\Python\Python38\site-packages\IPython\core\magic.py", line 187, in <lambda>
call = lambda f, *a, **k: f(*a, **k)
File "C:\Users\hana\AppData\Roaming\Python\Python38\site-packages\IPython\core\magics\pylab.py", line 99, in matplotlib
gui, backend = self.shell.enable_matplotlib(args.gui.lower() if isinstance(args.gui, str) else args.gui)
File "C:\Users\hana\AppData\Roaming\Python\Python38\site-packages\IPython\core\interactiveshell.py", line 3431, in enable_matplotlib
pt.activate_matplotlib(backend)
File "C:\Users\hana\AppData\Roaming\Python\Python38\site-packages\IPython\core\pylabtools.py", line 320, in activate_matplotlib
from matplotlib import pyplot as plt
File "C:\Users\hana\anaconda3\lib\site-packages\matplotlib\pyplot.py", line 36, in <module>
import matplotlib.colorbar
File "C:\Users\hana\anaconda3\lib\site-packages\matplotlib\colorbar.py", line 44, in <module>
import matplotlib.contour as contour
File "C:\Users\hana\anaconda3\lib\site-packages\matplotlib\contour.py", line 17, in <module>
import matplotlib.text as text
File "C:\Users\hana\anaconda3\lib\site-packages\matplotlib\text.py", line 16, in <module>
from .textpath import TextPath # Unused, but imported by others.
File "C:\Users\hana\anaconda3\lib\site-packages\matplotlib\textpath.py", line 11, in <module>
from matplotlib.mathtext import MathTextParser
File "C:\Users\hana\anaconda3\lib\site-packages\matplotlib\mathtext.py", line 27, in <module>
from PIL import Image
File "C:\Users\hana\AppData\Roaming\Python\Python38\site-packages\PIL\Image.py", line 94, in <module>
from . import _imaging as core
ImportError: cannot import name '_imaging' from 'PIL' (C:\Users\hana\AppData\Roaming\Python\Python38\site-packages\PIL\__init__.py)
I currently have matplotlib 3.3.4, tried changing the setting from inline to automatic and reinstalling anaconda but the error is still there :(
Thanks!
Upvotes: 2
Views: 857
Reputation: 31
I uninstalled anaconda again, then deleted all leftovers from the system directories (%appdata% & %programfiles%) and from Windows Registry.
After installing it again the error disappeared. :)
Upvotes: 1