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__)
相关推荐
浪潮IT馆7 小时前
在 VSCode 中调试 JavaScript 的 Jest 测试用例
javascript·ide·vscode
椰汁菠萝7 小时前
VSCode中properties文件读写
ide·vscode·properties
weixin_550083158 小时前
QTdesigner配置在pycharm里使用anaconda环境配置安装成功
ide·python·pycharm
dvlinker9 小时前
C/C++编程开发工具及实用软件推荐
ide·vscode·visual studio·qt creator·c/c++·source insight·编程工具
Kazefuku10 小时前
VS Code 和Visual Studio:简单易懂的区别
ide·windows·visual studio
Boxsc_midnight10 小时前
【一款支持Ollama本地部署的Visual Studio 2022 编程助手插件的编译和生成之路】解决打包安装问题
ide·visual studio·vs插件
-凌凌漆-10 小时前
vscode运行npm报错,npm : 无法加载文件 xxxxx/npm.ps1,因为在此系统上禁止运行脚本。
ide·vscode·npm
lingzhilab10 小时前
零知IDE——基于ESP32的ADS1115 多通道数据采集系统:从差分测量到Web实时监控
ide
Lxinccode11 小时前
python(70) : 网页IDE
开发语言·ide·python·网页ide
shishi5211 天前
trae重装后,无法预览调试弹窗报错的解决方案
ide·计算机视觉·语言模型