python - AttributeError:模块 matplotlib 没有属性 _tri
问题描述
我正在尝试在我的 conda 环境(Python 3.6)中使用 Matplotlib,但出现此错误。有谁知道如何解决这个问题?
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'
如果我需要发布错误的更多详细信息,请告诉我。
解决方案
我觉得你的二进制文件不匹配,不幸的是,我无法重现你的错误,因为我的工作正常。
(1): 也许尝试卸载 matplotlib 然后重新安装
conda uninstall matplotlib
conda install matplotlib
(2) 尝试输出conda list
,conda info
然后分析它,或者把它贴在这里也许我们可以分析它?
(3)尝试以下命令,也许它们会起作用:
conda update --all
(4) 如果这不起作用,请卸载 Anaconda 并尝试重新安装最新版本。
推荐阅读
- java - 使用数据库值设置 TextView
- google-apps-script - 如何在带有独立脚本的 Google 文档上使用“getBody()”?
- javascript - Chrome 扩展 - 添加到 gmail 撰写页面的元素未显示
- c# - 以弧度旋转矢量,同时保持幅度
- javascript - 为什么“instanceof”会产生不同的结果?
- bash - bash egrep - 不同用户的不同结果
- reactjs - 对 reactjs 表单使用 axios POST 时出现错误 400- 错误请求
- c# - 将 PHP cURL 转换为 C# WebClient
- python - 根据条件修改 DataFrame 列值
- android - React Native 在 Android 设备上崩溃,但在 iOS 上运行