AttributeError: module matplotlib has no attribute _tri

AttributeError: module matplotlib has no attribute _tri

我想在我的 conda 环境中使用 Matplotlib (Python 3.6) 我收到这个错误。有人知道如何解决这个问题吗?

import matplotlib.pyplot as plt

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
   ....
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\tri\triangulation.py in <module>()
  4 import six
  5 
----> 6 import matplotlib._tri as _tri
  7 import matplotlib._qhull as _qhull
  8 import numpy as np

AttributeError: module 'matplotlib' has no attribute '_tri'

如果我需要post错误的更多详细信息,请告诉我。

我觉得你的二进制文件不匹配,不幸的是,我无法重现你的错误,因为我的有效。

(1): 或许尝试卸载matplotlib 然后重新安装

conda uninstall matplotlib

conda install matplotlib

(2) 尝试输出 conda listconda info 然后分析它或 post 在这里也许我们可以分析它?

(3) 尝试以下命令也许它们会起作用:

conda update --all

(4) 如果这不起作用,可能卸载 Anaconda 并尝试重新安装它的最新版本。