@hunasshi1111

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

初心者 python matplotlib のエラー

解決したいこと

数日前にanacondaをインストールをしてPythonを勉強し始めました。
matplotlibをインポート使用とするとエラーが出てしまい色々と試してみましたが
解決できませんでした
どなたか解決方法を教えて下さい。

発生している問題・エラー

ImportError                               Traceback (most recent call last)
Cell In[6], line 1
----> 1 import matplotlib  

File c:\users\user\anaconda3\lib\site-packages\matplotlib\__init__.py:161
    157 from packaging.version import parse as parse_version
    159 # cbook must import matplotlib only within function
    160 # definitions, so it is safe to import from it here.
--> 161 from . import _api, _version, cbook, _docstring, rcsetup
    162 from matplotlib.cbook import sanitize_sequence
    163 from matplotlib._api import MatplotlibDeprecationWarning

File c:\users\user\anaconda3\lib\site-packages\matplotlib\cbook.py:32
     29     from numpy import VisibleDeprecationWarning
     31 import matplotlib
---> 32 from matplotlib import _api, _c_internal_utils
     35 def _get_running_interactive_framework():
     36     """
     37     Return the interactive framework whose event loop is currently running, if
     38     any, or "headless" if no event loop can be started, or None.
   (...)
     44         "macosx", "headless", ``None``.
     45     """

ImportError: cannot import name '_c_internal_utils' from partially initialized module 'matplotlib' (most likely due to a circular import) (c:\users\user\anaconda3\lib\site-packages\matplotlib\__init__.py)

自分で試したこと

ここに問題・エラーに対して試したことを記載してください。

anacondaを再インストール
matplotliを再インストール

0 likes

3Answer

Comments

  1. pip install numpy

    で _c_internal_utils がインストールされるか?

    yum install g++ linux-headers

    でcコンパイラをいれると_c_internal_utils がインストールされるか?

Comments

  1. @hunasshi1111

    Questioner

    今、conda install matplotliでインストールもしてみましたが駄目でした。

Your answer might help someone💌