Here is the code I received. I have already installed matplotlib as conda install matplotlib. Import matplotlib has not issues. Does anyone know what could be the problem?
ImportError Traceback (most recent call last)
<ipython-input-2-99ba79ecbbfb> in <module>
----> 1 from matplotlib import pyplot as plt
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py in <module>
2280 dict.__setitem__(rcParams, "backend", rcsetup._auto_backend_sentinel)
2281 # Set up the backend.
-> 2282 switch_backend(rcParams["backend"])
2283
2284 # Just to be safe. Interactive mode can be turned on without
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py in switch_backend(newbackend)
219 else "matplotlib.backends.backend_{}".format(newbackend.lower()))
220
--> 221 backend_mod = importlib.import_module(backend_name)
222 Backend = type(
223 "Backend", (matplotlib.backends._Backend,), vars(backend_mod))
C:\ProgramData\Anaconda3\lib\importlib\__init__.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129
C:\ProgramData\Anaconda3\lib\site-packages\ipykernel\pylab\backend_inline.py in <module>
7
8 import matplotlib
----> 9 from matplotlib.backends.backend_agg import (
10 new_figure_manager,
11 FigureCanvasAgg,
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py in <module>
48
49 if _has_pil:
---> 50 from PIL import Image
51
52 backend_version = 'v2.2'
~\AppData\Roaming\Python\Python38\site-packages\PIL\Image.py in <module>
92 # Also note that Image.core is not a publicly documented interface,
93 # and should be considered private and subject to change.
---> 94 from . import _imaging as core
95
96 if __version__ != getattr(core, "PILLOW_VERSION", None):
ImportError: cannot import name '_imaging' from 'PIL' (C:\Users\lmdom\AppData\Roaming\Python\Python38\site-packages\PIL\__init__.py)
from matplotlib import pyplot as plt