gpt4 book ai didi

python - 属性错误 : module 'matplotlib' has no attribute 'interactive'

转载 作者:行者123 更新时间:2023-12-04 00:21:39 25 4
gpt4 key购买 nike

关闭。这个问题需要debugging details .它目前不接受答案。












想改进这个问题?将问题更新为 on-topic对于堆栈溢出。

1年前关闭。




Improve this question




使用 %matplotlib inline 时在 Jupyter 笔记本中我收到错误:

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


这是 issue .
我也在 stackoverflow 中提到过这个问题
但我找不到答案。
我试过这个:
%matplotlib --list
发现了这个:

Available matplotlib backends: ['tk', 'gtk', 'gtk3', 'wx', 'qt4', 'qt5', 'qt', 'osx', 'nbagg', 'notebook', 'agg', 'svg', 'pdf', 'ps', 'inline', 'ipympl', 'widget']


它表明,我有 inline在我的 matplotlib 中,但无法使用它。
我也试过:
import matplotlib.pyplot as plt
不使用 %matplotlib inline但发现了这个错误:

ModuleNotFoundError: No module named 'matplotlib.pyplot'


然后,我尝试在我的 conda venv 中安装此模块并收到此错误:
error
请帮帮我:)

最佳答案

对我来说,解决方案是从我的 conda 环境中删除 matplotlib,这也会强制删除依赖项。
再次运行安装后:

conda install -c conda-forge matplotlib
一切都很好。

关于python - 属性错误 : module 'matplotlib' has no attribute 'interactive' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60302645/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com