• 카테고리

    질문 & 답변
  • 세부 분야

    데이터 분석

  • 해결 여부

    미해결

1.7.1 질문

20.12.30 16:46 작성 조회수 239

1

import matplotlib.pyplot as plt

plt.rc("font", family="Malgun Gothic")

--------------------------

ImportError                               Traceback (most recent call last)
<ipython-input-156-35cb1a0cfeb3> in <module>
----> 1 import matplotlib.pyplot as plt
      2 
      3 plt.rc("font", family="Malgun Gothic")
      4 #plt.rc("font", family="Malgun Gothic")

C:\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

C:\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

C:\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

C:\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)

C:\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

C:\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,

~\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\SM\AppData\Roaming\Python\Python38\site-packages\PIL\__init__.py)

이런 import error가 나는데 왜그런지 모르겠습니다 Pillow는 이미 설치되어있어요.. 구글링 해봤는데 해결을 못해서 질문드립니다.!

답변 3

·

답변을 작성해보세요.

1

kahs.game님의 프로필

kahs.game

2020.12.30

감사합니다! matpotlib 설치되어있는 건줄 알았어요 해결되었습니다 감사해요~

0

잘 해결되었다니 다행이에요! 감사합니다 :)

0

안녕하세요.

matplotlib 은 설치가 되었을까요?

matplotlib  이 제대로 설치되었는지 먼저 확인이 필요할것 같아요.

또, 아나콘다를 통해 설치해 주셨는지 따로 설치해 주셨는지도 궁금합니다.