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__)
相关推荐
wqfhenanxc1 小时前
vscode/cursor 远程Linux基础命令
linux·ide·vscode
我命由我123451 小时前
Python 开发问题:No Python interpreter configured for the project
开发语言·后端·python·学习·pycharm·学习方法·python3.11
Lv11770082 小时前
Visual Studio中的常量和只读变量
ide·笔记·c#·visual studio
Balding Curry2 小时前
vscode快速添加插件的3种方式
ide·vscode·编辑器
yyovoll2 小时前
循环知识点介绍 -蓝桥杯
jvm·ide·java-ee
Clarence Liu3 小时前
MacOS 在Trae IDE中构建现代C++开发环境:从新手到高效的完整指南
c++·ide·macos
木楚3 小时前
在idea中构建传统ssm框架的步骤和方式
java·ide·intellij-idea
蜡笔大新7984 小时前
IO流的认识(2)
java·ide·intellij-idea
spencer_tseng4 小时前
Eclipse JDT Core for Java Code Formatter
java·ide·eclipse
Java后端的Ai之路4 小时前
【AI编程工具】-关闭Trae IDE的Git自动Pull开关
ide·git·ai编程·trae