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__)
相关推荐
charlie11451419120 小时前
利用WSL + VSCode + ESP-IDF6开发ESP32系列单片机指南
ide·vscode·单片机·esp32·wsl·指南·工程
醇氧21 小时前
Idea防止工具栏自动隐藏
java·ide·intellij-idea
0欧姆1 天前
VScode 创建 QNX 模板工程
ide·vscode·编辑器
路人甲ing..1 天前
用 Android Studio 自带的模拟 Android Emulator 调试
android·java·ide·ubuntu·kotlin·android studio
路人甲ing..1 天前
Android Studio 模拟器报错 The emulator process for AVD xxxxx has terminated.
android·java·ide·kotlin·android studio
BD_Marathon1 天前
idea如何设置创建类的时候自动生成main方法
java·ide·intellij-idea
2501_941798732 天前
C++高性能音频处理与实时特征提取实战分享:多线程信号处理与低延迟优化经验
ide·macos·xcode
日日行不惧千万里2 天前
IDEA 是用什么开发的?
java·ide·intellij-idea
sg_knight2 天前
IntelliJ IDEA 实用插件:GitToolBox 使用指南
java·ide·git·intellij-idea·插件·gittoolbox
阿波茨的鹅2 天前
VSCode C++ 项目配置教程
c++·ide·vscode