import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-7-1e03ad6f8896> in <module>
1 import matplotlib as mpl
----> 2 import matplotlib.pyplot as plt
3 import numpy as np
D:\anaconda\lib\site-packages\matplotlib\pyplot.py in <module>
34 from cycler import cycler
35 import matplotlib
---> 36 import matplotlib.colorbar
37 import matplotlib.image
38 from matplotlib import rcsetup, style
D:\anaconda\lib\site-packages\matplotlib\colorbar.py in <module>
42 import matplotlib.collections as collections
43 import matplotlib.colors as colors
---> 44 import matplotlib.contour as contour
45 import matplotlib.cm as cm
46 import matplotlib.gridspec as gridspec
D:\anaconda\lib\site-packages\matplotlib\contour.py in <module>
15 import matplotlib.collections as mcoll
16 import matplotlib.font_manager as font_manager
---> 17 import matplotlib.text as text
18 import matplotlib.cbook as cbook
19 import matplotlib.mathtext as mathtext
D:\anaconda\lib\site-packages\matplotlib\text.py in <module>
14 from .font_manager import FontProperties
15 from .patches import FancyArrowPatch, FancyBboxPatch, Rectangle
---> 16 from .textpath import TextPath # Unused, but imported by others.
17 from .transforms import (
18 Affine2D, Bbox, BboxBase, BboxTransformTo, IdentityTransform, Transform)
D:\anaconda\lib\site-packages\matplotlib\textpath.py in <module>
9 from matplotlib.font_manager import FontProperties, get_font
10 from matplotlib.ft2font import LOAD_NO_HINTING, LOAD_TARGET_LIGHT
---> 11 from matplotlib.mathtext import MathTextParser
12 from matplotlib.path import Path
13 from matplotlib.transforms import Affine2D
D:\anaconda\lib\site-packages\matplotlib\mathtext.py in <module>
25
26 import numpy as np
---> 27 from PIL import Image
28 from pyparsing import (
29 Combine, Empty, FollowedBy, Forward, Group, Literal, oneOf, OneOrMore,
ModuleNotFoundError: No module named 'PIL'
!pip install Pillow
但是没有效果。现在再试先卸载,但是一直没有反应
你的python版本是不是3.9或者3.10的?