PyCharm中使用matplotlib.pyplot.show()报错MatplotlibDeprecationWarning的解决方案

其实这只是一个警告,忽略也可。

一、控制台输出

MatplotlibDeprecationWarning: Support for FigureCanvases without a required_interactive_framework attribute was deprecated in Matplotlib 3.6 and will be removed two minor releases later.

MatplotlibDeprecationWarning:在Matplotlib 3.6中,对不带required_interactive_framework属性的FigureCanvas的支持已被弃用,并将在两个次要版本后删除。

二、问题分析

当遇到这个警告信息时,它意味着你正在使用Matplotlib库的一个版本,该库已经弃用了某些功能或行为,并计划在将来的版本中删除这些功能。

这个具体的警告消息是指在Matplotlib版本3.6中引入了一项更改,影响了FigureCanvases对象。

三、问题解决方案

在PyCharm的Settings中取消勾选Tools---Python Scientific---Show plots in tool window

附:在Python脚本或交互式环境中查看当前安装的Matplotlib版本

py 复制代码
import matplotlib
print(matplotlib.__version__)
相关推荐
bkspiderx18 小时前
在Visual Studio中安装与配置Qt插件(Qt Visual Studio Tools)
ide·qt·visual studio·qt插件
lusklusklusk1 天前
使用Visual Studio一步步创建并部署SSRS_PBIRS报表:数据源配置、图表设计、参数化查询、部署参数与排错实战
数据库·ide·visual studio
解道Jdon2 天前
Rust重写OpenCode Rune:性能提升最高100倍
ide·windows·git·svn·eclipse·github·visual studio
莫卢俊德2 天前
vscode ssh config
ide·vscode·ssh
郝学胜-神的一滴6 天前
Effective Python 条款41:试Mix‑In组合式开发
开发语言·pytorch·python·pycharm·numpy
BD_Marathon6 天前
安装Jupyter notebook
ide·python·jupyter
2601_967980116 天前
Python 办公自动化合集 ⑰:Excel自动计算——总和/平均分/最大值
python·pycharm·办公自动化·数据处理·excel自动计算
承渊政道7 天前
【Python编程快速上手—让繁琐工作自动化】(模式匹配与正则表达式:从找到一个号码到批量提取信息)
python·正则表达式·pycharm·自动化·模式匹配
讓丄帝愛伱7 天前
Zed Markdown 预览不能铺满全屏的原因及解决
ide
BD_Marathon8 天前
Jupyter魔法命令
ide·python·jupyter