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__)
相关推荐
WoY20201 天前
本地PyCharm配置远程服务器上的python环境
服务器·python·pycharm
怪力左手1 天前
vscode扩展离线下载
ide·vscode·编辑器
quanyechacsdn1 天前
Android Studio创建库文件用jitpack构建后使用implementation方式引用
android·ide·kotlin·android studio·implementation·android 库文件·使用jitpack
larance1 天前
jupyter 服务端扩展开发
ide·python·jupyter
Juskey iii1 天前
Android Studio Electric Eel | 2022.1.1 Patch 2 版本下载
android·ide·android studio
drebander1 天前
Cursor IDE 中 Java 项目无法跳转到方法定义问题解决方案
java·ide·cursor
JH30731 天前
消除Intellij IDEA的Not annotated parameter overrides @NonNullApi parameter警告
ide
yiSty1 天前
在VScode中安装Yarn
ide·vscode·编辑器
i_am_a_div_日积月累_1 天前
vscode点击文件会覆盖上一个文件
ide·vscode·编辑器
drebander1 天前
Cursor IDE 中 Spring Boot 项目启动内存不足问题解决方案
ide·spring boot·cursor